minor #27986 Fix test file relative for AppVeyor (yceruto)
This PR was merged into the 4.2-dev branch.
Discussion
----------
Fix test file relative for AppVeyor
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Fix test for AppVeyor introduced in https://github.com/symfony/symfony/pull/27978
https://ci.appveyor.com/project/fabpot/symfony/build/1.0.38700#L616
Commits
-------
186a7a9824
Fix test file relative for AppVeyor
This commit is contained in:
commit
090578034d
@ -25,7 +25,7 @@ class CodeExtensionTest extends TestCase
|
|||||||
|
|
||||||
public function testFileRelative()
|
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()
|
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__);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user