[DependencyInjection] fixed tests

This commit is contained in:
Fabien Potencier 2010-06-28 09:14:33 +02:00
parent aa697d8a0c
commit 7dfa995784
2 changed files with 5 additions and 5 deletions

View File

@ -77,9 +77,9 @@ class BuilderConfigurationTest extends \PHPUnit_Framework_TestCase
$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');
}
@ -204,8 +204,8 @@ class BuilderConfigurationTest extends \PHPUnit_Framework_TestCase
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');
}
}

View File

@ -34,7 +34,7 @@ class FileResourceTest extends \PHPUnit_Framework_TestCase
*/
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');
}
/**