AddressTest.php 936 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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. /**
  19. * @test
  20. */
  21. public function testCityName()
  22. {
  23. $city = $this->faker->cityName();
  24. $this->assertNotEmpty($city);
  25. $this->assertInternalType('string', $city);
  26. }
  27. /**
  28. * @test
  29. */
  30. public function testDistrict()
  31. {
  32. $district = $this->faker->district();
  33. $this->assertNotEmpty($district);
  34. $this->assertInternalType('string', $district);
  35. }
  36. /**
  37. * @test
  38. */
  39. public function testRegion()
  40. {
  41. $region = $this->faker->region();
  42. $this->assertNotEmpty($region);
  43. $this->assertInternaltype('string', $region);
  44. }
  45. }