菜谱项目

InternetTest.php 603B

12345678910111213141516171819202122232425262728
  1. <?php
  2. namespace Faker\Test\Provider\ja_JP;
  3. use Faker\Generator;
  4. use Faker\Provider\ja_JP\Internet;
  5. class InternetTest extends \PHPUnit_Framework_TestCase
  6. {
  7. public function testUserName()
  8. {
  9. $faker = new Generator();
  10. $faker->addProvider(new Internet($faker));
  11. $faker->seed(1);
  12. $this->assertEquals('akira72', $faker->userName);
  13. }
  14. public function testDomainName()
  15. {
  16. $faker = new Generator();
  17. $faker->addProvider(new Internet($faker));
  18. $faker->seed(1);
  19. $this->assertEquals('nakajima.com', $faker->domainName);
  20. }
  21. }