8000 minor #21256 [FrameworkBundle] Skip test if xdebug.file_link_format i… · symfony/symfony@aebb659 · GitHub
[go: up one dir, main page]

Skip to content

Commit aebb659

Browse files
minor #21256 [Framewo 8000 rkBundle] Skip test if xdebug.file_link_format is defined. (lyrixx)
This PR was merged into the 2.7 branch. Discussion ---------- [FrameworkBundle] Skip test if xdebug.file_link_format is defined. | Q | A | ------------- | --- | Branch? | 2.7 | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | - | License | MIT | Doc PR | - --- The test suite does not pass locally because I use a custom file_link_format. I do it because it works everywhere. Then, Symfony tries to read this value before the default one. We could use ini_set before the test but unfortunatelly there are no way to define the "cfg_var". For recall, get_cfg_var allows to return the configuration value even if the extension is not loaded. And again it's my case: I don't enable xdebug to have better performance. Commits ------- 7f15bc3 [FrameworkBundle] Skip test if xdebug.file_link_format is defined.
2 parents 6430d53 + 7f15bc3 commit aebb659

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTest.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -318,6 +318,10 @@ public function testAnnotations()
318318

319319
public function testFileLinkFormat()
320320
{
321+
if (ini_get('xdebug.file_link_format') || get_cfg_var('xdebug.file_link_format')) {
322+
$this->markTestSkipped('A custom file_link_format is defined.');
323+
}
324+
321325
$container = $this->createContainerFromFile('full');
322326

323327
$this->assertEquals('file%link%format', $container->getParameter('templating.helper.code.file_link_format'));

0 commit comments

Comments
 (0)
0