菜谱项目

PersonTest.php 608B

12345678910111213141516171819202122232425262728
  1. <?php
  2. namespace Faker\Test\Provider\mn_MN;
  3. use Faker\Generator;
  4. use Faker\Provider\mn_MN\Person;
  5. class PersonTest extends \PHPUnit_Framework_TestCase
  6. {
  7. public function testName()
  8. {
  9. $faker = new Generator();
  10. $faker->addProvider(new Person($faker));
  11. $faker->seed(1);
  12. $this->assertRegExp('/^[А-Я]{1}\.[\w\W]+$/u', $faker->name);
  13. }
  14. public function testIdNumber()
  15. {
  16. $faker = new Generator();
  17. $faker->addProvider(new Person($faker));
  18. $faker->seed(2);
  19. $this->assertRegExp('/^[А-Я]{2}\d{8}$/u', $faker->idNumber);
  20. }
  21. }