菜谱项目

PersonTest.php 1.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. <?php
  2. namespace Faker\Test\Provider\uk_UA;
  3. use Faker\Generator;
  4. use Faker\Provider\uk_UA\Person;
  5. class PersonTest extends \PHPUnit_Framework_TestCase
  6. {
  7. public function testFirstNameMaleReturns()
  8. {
  9. $faker = new Generator();
  10. $faker->addProvider(new Person($faker));
  11. $faker->seed(1);
  12. $this->assertEquals('Максим', $faker->firstNameMale());
  13. }
  14. public function testFirstNameFemaleReturns()
  15. {
  16. $faker = new Generator();
  17. $faker->addProvider(new Person($faker));
  18. $faker->seed(1);
  19. $this->assertEquals('Людмила', $faker->firstNameFemale());
  20. }
  21. public function testMiddleNameMaleReturns()
  22. {
  23. $faker = new Generator();
  24. $faker->addProvider(new Person($faker));
  25. $faker->seed(1);
  26. $this->assertEquals('Миколайович', $faker->middleNameMale());
  27. }
  28. public function testMiddleNameFemaleReturns()
  29. {
  30. $faker = new Generator();
  31. $faker->addProvider(new Person($faker));
  32. $faker->seed(1);
  33. $this->assertEquals('Миколаївна', $faker->middleNameFemale());
  34. }
  35. public function testLastNameReturns()
  36. {
  37. $faker = new Generator();
  38. $faker->addProvider(new Person($faker));
  39. $faker->seed(1);
  40. $this->assertEquals('Броваренко', $faker->lastName());
  41. }
  42. }