You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 lines
615B

  1. <?php
  2. namespace Faker\Test\Provider;
  3. use Faker\Generator;
  4. use Faker\Provider\Company;
  5. use Faker\Provider\Lorem;
  6. class CompanyTest extends \PHPUnit_Framework_TestCase
  7. {
  8. /**
  9. * @var Generator
  10. */
  11. private $faker;
  12. public function setUp()
  13. {
  14. $faker = new Generator();
  15. $faker->addProvider(new Company($faker));
  16. $faker->addProvider(new Lorem($faker));
  17. $this->faker = $faker;
  18. }
  19. public function testJobTitle()
  20. {
  21. $jobTitle = $this->faker->jobTitle();
  22. $pattern = '/^[A-Za-z]+$/';
  23. $this->assertRegExp($pattern, $jobTitle);
  24. }
  25. }