AddressTest.php 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. <?php
  2. namespace Faker\Test\Provider\en_PH;
  3. use Faker\Generator;
  4. use Faker\Provider\en_PH\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 testProvince()
  19. {
  20. $province = $this->faker->province();
  21. $this->assertNotEmpty($province);
  22. $this->assertInternalType('string', $province);
  23. }
  24. public function testCity()
  25. {
  26. $city = $this->faker->city();
  27. $this->assertNotEmpty($city);
  28. $this->assertInternalType('string', $city);
  29. }
  30. public function testMunicipality()
  31. {
  32. $municipality = $this->faker->municipality();
  33. $this->assertNotEmpty($municipality);
  34. $this->assertInternalType('string', $municipality);
  35. }
  36. public function testBarangay()
  37. {
  38. $barangay = $this->faker->barangay();
  39. $this->assertInternalType('string', $barangay);
  40. }
  41. }