From f6ecddda1e3e908c59b5a1ae20265653e300bc1f Mon Sep 17 00:00:00 2001 From: newman101 Date: Thu, 12 Nov 2015 10:17:44 +0000 Subject: [PATCH 1/3] Added en_PH unit test folder + AddressTest.php --- test/Faker/Provider/en_PH/AddressTest.php | 47 +++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 test/Faker/Provider/en_PH/AddressTest.php diff --git a/test/Faker/Provider/en_PH/AddressTest.php b/test/Faker/Provider/en_PH/AddressTest.php new file mode 100644 index 0000000000..047f05d367 --- /dev/null +++ b/test/Faker/Provider/en_PH/AddressTest.php @@ -0,0 +1,47 @@ +addProvider(new Address($faker)); + $this->faker = $faker; + } + + public function testProvince() + { + $province = $this->faker->province(); + $this->assertInternalType('string', $province); + } + + public function testCity() + { + $city = $this->faker->city(); + $this->assertInternalType('string', $city); + } + + public function testMunicipality() + { + $municipality = $this->faker->municipality(); + $this->assertInternalType('string', $municipality); + } + + public function testBarangay() + { + $barangay = $this->faker->barangay(); + $this->assertInternalType('string', $barangay); + } +} From 7c2659640e837b5561e3b77e3d40aa5fe4ba352e Mon Sep 17 00:00:00 2001 From: newman101 Date: Thu, 12 Nov 2015 11:33:57 +0000 Subject: [PATCH 2/3] Removed unused class from AddressTest.php --- test/Faker/Provider/en_PH/AddressTest.php | 1 - 1 file changed, 1 deletion(-) diff --git a/test/Faker/Provider/en_PH/AddressTest.php b/test/Faker/Provider/en_PH/AddressTest.php index 047f05d367..32ea48d83a 100644 --- a/test/Faker/Provider/en_PH/AddressTest.php +++ b/test/Faker/Provider/en_PH/AddressTest.php @@ -4,7 +4,6 @@ use Faker\Generator; use Faker\Provider\en_PH\Address; -use Faker\Provider\en_PH\Person; class AddressTest extends \PHPUnit_Framework_TestCase { From 7c5df082483846c550bef1eaadf98c38642cfac4 Mon Sep 17 00:00:00 2001 From: newman101 Date: Thu, 12 Nov 2015 11:45:03 +0000 Subject: [PATCH 3/3] Added few more tests to AddressTest.php --- test/Faker/Provider/en_PH/AddressTest.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/Faker/Provider/en_PH/AddressTest.php b/test/Faker/Provider/en_PH/AddressTest.php index 32ea48d83a..d3b4682b36 100644 --- a/test/Faker/Provider/en_PH/AddressTest.php +++ b/test/Faker/Provider/en_PH/AddressTest.php @@ -23,18 +23,21 @@ public function setUp() public function testProvince() { $province = $this->faker->province(); + $this->assertNotEmpty($province); $this->assertInternalType('string', $province); } public function testCity() { $city = $this->faker->city(); + $this->assertNotEmpty($city); $this->assertInternalType('string', $city); } public function testMunicipality() { $municipality = $this->faker->municipality(); + $this->assertNotEmpty($municipality); $this->assertInternalType('string', $municipality); }