From 0f12adcffff17e4012763b6655d93882c194d3a7 Mon Sep 17 00:00:00 2001 From: "Barry vd. Heuvel" Date: Fri, 12 Nov 2021 09:12:57 +0100 Subject: [PATCH] Check test for xdebug (#1256) * Update ViewCollectorTest.php * Update ViewCollectorTest.php --- tests/DataCollector/ViewCollectorTest.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tests/DataCollector/ViewCollectorTest.php b/tests/DataCollector/ViewCollectorTest.php index 1b3c6a31..67673847 100644 --- a/tests/DataCollector/ViewCollectorTest.php +++ b/tests/DataCollector/ViewCollectorTest.php @@ -12,6 +12,13 @@ class ViewCollectorTest extends TestCase public function testIdeLinksAreAbsolutePaths() { + if (!ini_get('xdebug.file_link_format')) { + $this->markTestSkipped( + 'The Xdebug extension is not available.' + ); + return; + } + debugbar()->boot(); /** @var \Barryvdh\Debugbar\DataCollector\ViewCollector $collector */ @@ -23,7 +30,7 @@ public function testIdeLinksAreAbsolutePaths() tap(Arr::first($collector->collect()['templates']), function (array $template) { $this->assertEquals( 'vscode://file/' . realpath(__DIR__ . '/../resources/views/dashboard.blade.php') . ':1', - $template['xdebug_link']['url'], + $template['xdebug_link']['url'] ); }); }