This repository was archived by the owner on Dec 17, 2022. It is now read-only.
File tree 5 files changed +44
-5
lines changed
5 files changed +44
-5
lines changed Original file line number Diff line number Diff line change
1
+ language : php
2
+
3
+ php :
4
+ - ' 5.6'
5
+ - ' 7.0'
6
+ - hhvm
7
+
8
+
9
+ before_script :
10
+ - composer install --dev
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change 1
1
<?xml version =" 1.0" encoding =" utf-8" ?>
2
- <phpunit bootstrap =" ./ vendor/autoload.php"
2
+ <phpunit bootstrap =" vendor/autoload.php"
3
3
colors =" true" >
4
4
5
5
<testsuites >
Original file line number Diff line number Diff line change @@ -325,6 +325,7 @@ class BuzzwordJobProvider extends BaseProvider
325
325
'Researcher ' ,
326
326
'Reviewer ' ,
327
327
'Revolutionary ' ,
328
+ 'Rockstar ' ,
328
329
'Scout ' ,
329
330
'Scouter ' ,
330
331
'Secretary ' ,
@@ -377,4 +378,4 @@ private static function getTitle()
377
378
{
378
379
return self ::$ titles [array_rand (self ::$ titles )];
379
380
}
380
- }
381
+ }
Original file line number Diff line number Diff line change @@ -12,10 +12,10 @@ class BuzzwordJobProviderTest extends \PHPUnit_Framework_TestCase
12
12
/** @test */
13
13
public function it_generates_a_three_word_job_title ()
14
14
{
15
- $ jobTitle = BuzzwordJobProvider::jobTitle ($ extraTitle = true );
15
+ $ jobTitle = BuzzwordJobProvider::jobTitle ();
16
16
17
17
$ jobTitleWords = explode (' ' , $ jobTitle );
18
- Assert::assertCount (3 , $ jobTitleWords );
18
+ Assert::assertGreaterThanOrEqual (3 , $ jobTitleWords );
19
19
}
20
20
21
21
/** @test */
@@ -26,6 +26,6 @@ public function it_can_be_added_to_faker_as_a_provider_and_used()
26
26
27
27
$ jobTitle = $ faker ->jobTitle ();
28
28
$ jobTitleWords = explode (' ' , $ jobTitle );
29
- Assert::assertCount (3 , $ jobTitleWords );
29
+ Assert::assertGreaterThanOrEqual (3 , $ jobTitleWords );
30
30
}
31
31
}
You can’t perform that action at this time.
0 commit comments