菜谱项目

PersonTest.php 562B

123456789101112131415161718192021222324252627282930
  1. <?php
  2. namespace Faker\Test\Provider\ng_NG;
  3. use Faker\Generator;
  4. use Faker\Provider\en_NG\Person;
  5. class PersonTest extends \PHPUnit_Framework_TestCase
  6. {
  7. /**
  8. * @var Generator
  9. */
  10. private $faker;
  11. public function setUp()
  12. {
  13. $faker = new Generator();
  14. $faker->addProvider(new Person($faker));
  15. $this->faker = $faker;
  16. }
  17. public function testPersonNameIsAValidString()
  18. {
  19. $name = $this->faker->name;
  20. $this->assertNotEmpty($name);
  21. $this->assertInternalType('string', $name);
  22. }
  23. }