From 9ef7d037615e115b71ce9b6cca9e988253facc3e Mon Sep 17 00:00:00 2001 From: Mark van der Velden Date: Sat, 18 May 2013 17:39:10 +0200 Subject: [PATCH] Fixing the test. --- test/Faker/Provider/nl_NL/PersonTest.php | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/test/Faker/Provider/nl_NL/PersonTest.php b/test/Faker/Provider/nl_NL/PersonTest.php index 6ccaab8c..16f32cc2 100644 --- a/test/Faker/Provider/nl_NL/PersonTest.php +++ b/test/Faker/Provider/nl_NL/PersonTest.php @@ -8,41 +8,39 @@ namespace Faker\Test\Provider\nl_NL; class PersonTest extends \PHPUnit_Framework_TestCase { /** - * Return the nl_NL provider - * - * @return \Faker\Provider\nl_NL\Person + * @var \Faker\Generator */ - private function getProvider() + private $faker; + + public function setUp() { $faker = new \Faker\Generator(); - return new \Faker\Provider\nl_NL\Person($faker); - } + $faker->addProvider(new \Faker\Provider\nl_NL\Person($faker)); + $this->faker = $faker; + } public function testGeneratingFirstNames() { - $provider = $this->getProvider(); for ($i=0; $i<50; $i++) { - $this->assertInternalType('string', $provider->firstName()); + $this->assertInternalType('string', $this->faker->firstName()); } } public function testGeneratingLastNames() { - $provider = $this->getProvider(); for ($i=0; $i<50; $i++) { - $this->assertInternalType('string', $provider->lastName()); + $this->assertInternalType('string', $this->faker->lastName()); } } public function testGeneratingNames() { - $provider = $this->getProvider(); for ($i=0; $i<50; $i++) { - $this->assertInternalType('string', $provider->name()); + $this->assertInternalType('string', $this->faker->name()); } } } \ No newline at end of file