Skip to content

Commit

Permalink
Changelog, tests, readme
Browse files Browse the repository at this point in the history
  • Loading branch information
karllhughes committed Aug 14, 2015
1 parent 4a117db commit ecdbd36
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 34 deletions.
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,24 @@
# Changelog
All Notable changes to `jobs-govt` will be documented in this file

## 0.5.0 - 2015-08-14

### Added
- Nothing

### Deprecated
- Nothing

### Fixed
- Updated to v1.0.3 of jobs-common

### Removed
- Query setters for city/state/location as the API doesn't officially support them
- getParameters and parseLocation methods

### Security
- Nothing

## 0.4.3 - 2015-07-25

### Added
Expand Down
13 changes: 10 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,22 @@ as the provider.
$client = new JobBrander\Jobs\Client\Provider\Govt();

// Search for 200 job listings for 'project manager' in Chicago, IL
$jobs = $client->setKeyword('project manager')
->setCity('Chicago')
->setState('IL')
$jobs = $client->setKeyword('project manager')\
->setCount(200)
->getJobs();
```

The `getJobs` method will return a [Collection](https://github.com/JobBrander/jobs-common/blob/master/src/Collection.php) of [Job](https://github.com/JobBrander/jobs-common/blob/master/src/Job.php) objects.

### Location Queries

Because this API does not support location-based queries, you will need to add the location
to your setKeyword() method call. For example:

```
$jobs = $client->setKeyword('project manager in chicago, il')->getJobs();
```

## Testing

``` bash
Expand Down
31 changes: 0 additions & 31 deletions tests/src/GovtTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,37 +54,6 @@ public function testUrlIncludesKeywordWhenKeywordProvided()
$this->assertContains($param, $url);
}

public function testUrlIncludesKeywordWhenCityAndStateProvided()
{
$city = uniqid();
$state = uniqid();
$param = 'query='.urlencode(' in '.$city.', '.$state);

$url = $this->client->setCity($city)->setState($state)->getUrl();

$this->assertContains($param, $url);
}

public function testUrlIncludesKeywordWhenCityProvided()
{
$city = uniqid();
$param = 'query='.urlencode(' in '.$city);

$url = $this->client->setCity($city)->getUrl();

$this->assertContains($param, $url);
}

public function testUrlIncludesKeywordWhenStateProvided()
{
$state = uniqid();
$param = 'query='.urlencode(' in '.$state);

$url = $this->client->setState($state)->getUrl();

$this->assertContains($param, $url);
}

public function testUrlNotIncludesKeywordWhenNotProvided()
{
$param = 'query=';
Expand Down

0 comments on commit ecdbd36

Please sign in to comment.