diff --git a/src/Symfony/Bridge/Twig/Tests/Extension/CodeExtensionTest.php b/src/Symfony/Bridge/Twig/Tests/Extension/CodeExtensionTest.php index 52e7ff876c..c152ba6d60 100644 --- a/src/Symfony/Bridge/Twig/Tests/Extension/CodeExtensionTest.php +++ b/src/Symfony/Bridge/Twig/Tests/Extension/CodeExtensionTest.php @@ -25,7 +25,7 @@ class CodeExtensionTest extends TestCase public function testFileRelative() { - $this->assertEquals('path/to/file.ext', $this->getExtension()->getFileRelative('/root/path/to/file.ext')); + $this->assertEquals('CodeExtensionTest.php', $this->getExtension()->getFileRelative(__FILE__)); } /** @@ -69,6 +69,6 @@ class CodeExtensionTest extends TestCase protected function getExtension() { - return new CodeExtension(new FileLinkFormatter('proto://%f#&line=%l&'.substr(__FILE__, 0, 5).'>foobar'), '/root', 'UTF-8', '/root'); + return new CodeExtension(new FileLinkFormatter('proto://%f#&line=%l&'.substr(__FILE__, 0, 5).'>foobar'), '/root', 'UTF-8', __DIR__); } }