Skip to content

Commit 0f12adc

Browse files
authored
Check test for xdebug (#1256)
* Update ViewCollectorTest.php * Update ViewCollectorTest.php
1 parent e06041c commit 0f12adc

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

tests/DataCollector/ViewCollectorTest.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,13 @@ class ViewCollectorTest extends TestCase
1212

1313
public function testIdeLinksAreAbsolutePaths()
1414
{
15+
if (!ini_get('xdebug.file_link_format')) {
16+
$this->markTestSkipped(
17+
'The Xdebug extension is not available.'
18+
);
19+
return;
20+
}
21+
1522
debugbar()->boot();
1623

1724
/** @var \Barryvdh\Debugbar\DataCollector\ViewCollector $collector */
@@ -23,7 +30,7 @@ public function testIdeLinksAreAbsolutePaths()
2330
tap(Arr::first($collector->collect()['templates']), function (array $template) {
2431
$this->assertEquals(
2532
'vscode://file/' . realpath(__DIR__ . '/../resources/views/dashboard.blade.php') . ':1',
26-
$template['xdebug_link']['url'],
33+
$template['xdebug_link']['url']
2734
);
2835
});
2936
}

0 commit comments

Comments
 (0)