AddressTest.php 867 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <?php
  2. namespace Faker\Test\Provider\en_UG;
  3. use Faker\Generator;
  4. use Faker\Provider\en_UG\Address;
  5. use PHPUnit\Framework\TestCase;
  6. class AddressTest extends TestCase
  7. {
  8. /**
  9. * @var Faker\Generator
  10. */
  11. private $faker;
  12. public function setUp()
  13. {
  14. $faker = new Generator();
  15. $faker->addProvider(new Address($faker));
  16. $this->faker = $faker;
  17. }
  18. public function testCityName()
  19. {
  20. $city = $this->faker->cityName();
  21. $this->assertNotEmpty($city);
  22. $this->assertInternalType('string', $city);
  23. }
  24. public function testDistrict()
  25. {
  26. $district = $this->faker->district();
  27. $this->assertNotEmpty($district);
  28. $this->assertInternalType('string', $district);
  29. }
  30. public function testRegion()
  31. {
  32. $region = $this->faker->region();
  33. $this->assertNotEmpty($region);
  34. $this->assertInternaltype('string', $region);
  35. }
  36. }