Skip to content
This repository was archived by the owner on Dec 17, 2022. It is now read-only.

Commit 9c5edcd

Browse files
committed
Merge pull request #3 from Brunty/develop
Release to master
2 parents f538425 + d960944 commit 9c5edcd

5 files changed

+44
-5
lines changed

.travis.yml

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
language: php
2+
3+
php:
4+
- '5.6'
5+
- '7.0'
6+
- hhvm
7+
8+
9+
before_script:
10+
- composer install --dev

README.md

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
Buzzword Job Title Provider for Faker
2+
====================
3+
4+
[![Build Status](https://travis-ci.org/Brunty/faker-buzzword-job-titles.svg?branch=develop)](https://travis-ci.org/Brunty/faker-buzzword-job-titles)
5+
6+
7+
## Install
8+
Install the provider by adding `brunty/faker-buzzword-jobs` to your composer.json or from the command line:
9+
10+
```
11+
$ composer require brunty/faker-buzzword-jobs
12+
```
13+
14+
## Usage
15+
16+
```php
17+
$faker = \Faker\Factory::create();
18+
$faker->addProvider(new \Brunty\Faker\BuzzwordJobProvider($faker));
19+
20+
$jobTitle = $faker->jobTitle();
21+
```
22+
23+
## Examples of job titles:
24+
25+
* Holistic Insight Associate
26+
* Industry Leading Release Reviewer
27+
* Offline Module Scout
28+
* Creative Integration Planner

phpunit.xml.dist

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="utf-8" ?>
2-
<phpunit bootstrap="./vendor/autoload.php"
2+
<phpunit bootstrap="vendor/autoload.php"
33
colors="true">
44

55
<testsuites>

src/BuzzwordJobProvider.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -325,6 +325,7 @@ class BuzzwordJobProvider extends BaseProvider
325325
'Researcher',
326326
'Reviewer',
327327
'Revolutionary',
328+
'Rockstar',
328329
'Scout',
329330
'Scouter',
330331
'Secretary',
@@ -377,4 +378,4 @@ private static function getTitle()
377378
{
378379
return self::$titles[array_rand(self::$titles)];
379380
}
380-
}
381+
}

tests/BuzzwordJobProviderTest.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ class BuzzwordJobProviderTest extends \PHPUnit_Framework_TestCase
1212
/** @test */
1313
public function it_generates_a_three_word_job_title()
1414
{
15-
$jobTitle = BuzzwordJobProvider::jobTitle($extraTitle = true);
15+
$jobTitle = BuzzwordJobProvider::jobTitle();
1616

1717
$jobTitleWords = explode(' ', $jobTitle);
18-
Assert::assertCount(3, $jobTitleWords);
18+
Assert::assertGreaterThanOrEqual(3, $jobTitleWords);
1919
}
2020

2121
/** @test */
@@ -26,6 +26,6 @@ public function it_can_be_added_to_faker_as_a_provider_and_used()
2626

2727
$jobTitle = $faker->jobTitle();
2828
$jobTitleWords = explode(' ', $jobTitle);
29-
Assert::assertCount(3, $jobTitleWords);
29+
Assert::assertGreaterThanOrEqual(3, $jobTitleWords);
3030
}
3131
}

0 commit comments

Comments
 (0)