菜谱项目

PersonTest.php 1003B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <?php
  2. namespace Faker\Test\Provider\id_ID;
  3. use Faker\Generator;
  4. use Faker\Provider\id_ID\Person;
  5. class PersonTest extends \PHPUnit_Framework_TestCase
  6. {
  7. public function setUp()
  8. {
  9. $faker = new Generator();
  10. $faker->addProvider(new Person($faker));
  11. $this->faker = $faker;
  12. }
  13. public function testIfFirstNameMaleCanReturnData()
  14. {
  15. $firstNameMale = $this->faker->firstNameMale();
  16. $this->assertNotEmpty($firstNameMale);
  17. }
  18. public function testIfLastNameMaleCanReturnData()
  19. {
  20. $lastNameMale = $this->faker->lastNameMale();
  21. $this->assertNotEmpty($lastNameMale);
  22. }
  23. public function testIfFirstNameFemaleCanReturnData()
  24. {
  25. $firstNameFemale = $this->faker->firstNameFemale();
  26. $this->assertNotEmpty($firstNameFemale);
  27. }
  28. public function testIfLastNameFemaleCanReturnData()
  29. {
  30. $lastNameFemale = $this->faker->lastNameFemale();
  31. $this->assertNotEmpty($lastNameFemale);
  32. }
  33. }