Skip to content
This repository has been archived by the owner on Dec 11, 2020. It is now read-only.

Added en_PH unit test folder + AddressTest.php #773

Merged
merged 3 commits into from
Feb 23, 2016
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions test/Faker/Provider/en_PH/AddressTest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
<?php

namespace Faker\Test\Provider\en_PH;

use Faker\Generator;
use Faker\Provider\en_PH\Address;
use Faker\Provider\en_PH\Person;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If Im not mistaking, this class is never used and can be removed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting, I thought I removed it. O.o

But apparently, I did not.

Sorry for inconvenience.


class AddressTest extends \PHPUnit_Framework_TestCase
{

/**
* @var Faker\Generator
*/
private $faker;

public function setUp()
{
$faker = new Generator();
$faker->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);
}
}