Skip to content

Commit

Permalink
[DependencyInjection] fixed tests
Browse files Browse the repository at this point in the history
  • Loading branch information
fabpot committed Jun 28, 2010
1 parent aa697d8 commit 7dfa995
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Expand Up @@ -77,9 +77,9 @@ public function testMerge()
$this->assertEquals('BazClass', $configuration->getDefinition('foo')->getClass(), '->merge() overrides already defined services');

$configuration = new BuilderConfiguration();
$configuration->addResource($a = new FileResource('foo.xml'));
$configuration->addResource($a = new FileResource(self::$fixturesPath.'/xml/services1.xml'));
$config = new BuilderConfiguration();
$config->addResource($b = new FileResource('foo.yml'));
$config->addResource($b = new FileResource(self::$fixturesPath.'/xml/services2.xml'));
$configuration->merge($config);
$this->assertEquals(array($a, $b), $configuration->getResources(), '->merge() merges resources');
}
Expand Down Expand Up @@ -204,8 +204,8 @@ public function testFindDefinition()
public function testResources()
{
$configuration = new BuilderConfiguration();
$configuration->addResource($a = new FileResource('foo.xml'));
$configuration->addResource($b = new FileResource('foo.yml'));
$configuration->addResource($a = new FileResource(self::$fixturesPath.'/xml/services1.xml'));
$configuration->addResource($b = new FileResource(self::$fixturesPath.'/xml/services2.xml'));
$this->assertEquals(array($a, $b), $configuration->getResources(), '->getResources() returns an array of resources read for the current configuration');
}
}
Expand Up @@ -34,7 +34,7 @@ public function tearDown()
*/
public function testGetResource()
{
$this->assertEquals($this->file, $this->resource->getResource(), '->getResource() returns the path to the resource');
$this->assertEquals(realpath($this->file), $this->resource->getResource(), '->getResource() returns the path to the resource');
}

/**
Expand Down

0 comments on commit 7dfa995

Please sign in to comment.