Skip to content

Commit

Permalink
package split
Browse files Browse the repository at this point in the history
  • Loading branch information
dracony committed Sep 18, 2015
1 parent 7769294 commit 5287449
Showing 1 changed file with 10 additions and 14 deletions.
24 changes: 10 additions & 14 deletions tests/PHPixie/Tests/Auth/Providers/Builder/ImplementationTest.php
Expand Up @@ -35,7 +35,7 @@ public function testBuildProvider()
));
}

protected function providerTest($type)
protected function providerTest($type, $class, $attributes = array())
{
$domain = $this->getDomain();
$configData = $this->getSliceData();
Expand All @@ -44,23 +44,19 @@ protected function providerTest($type)
$providers = $this->providers;
$provider = $providers->$method($domain, 'pixie', $configData);

$class = '\PHPixie\Auth\Providers\Type\\'.ucfirst($type);
$this->assertInstance($provider, $class, array(
'domain' => $domain,
'name' => 'pixie',
'configData' => $configData
));
$attributes = array_merge(
array(
'domain' => $domain,
'name' => 'pixie',
'configData' => $configData
),
$attributes
);
$this->assertInstance($provider, $class, $attributes);

return $provider;
}

protected function assertAttributes($instance, $propertyMap)
{
foreach($propertyMap as $name => $value) {
$this->assertAttributeEquals($value, $name, $instance);
}
}

protected function getDomain()
{
return $this->quickMock('\PHPixie\Auth\Domains\Domain');
Expand Down

0 comments on commit 5287449

Please sign in to comment.