diff --git a/tests/Unit/Helper/BacktraceIgnoreMatcherTest.php b/tests/Unit/Helper/BacktraceIgnoreMatcherTest.php index b6091494..98231d0f 100644 --- a/tests/Unit/Helper/BacktraceIgnoreMatcherTest.php +++ b/tests/Unit/Helper/BacktraceIgnoreMatcherTest.php @@ -30,15 +30,18 @@ public function testFileIgnorance(): void $file = $reflection->getFileName(); $this->assertFalse(BacktraceIgnoreMatcher::isIgnoredByFile($backtrace, [preg_quote($file)])); - $this->assertFalse(BacktraceIgnoreMatcher::isIgnoredByFile($backtrace, [__FILE__])); + $this->assertFalse(BacktraceIgnoreMatcher::isIgnoredByFile($backtrace, [preg_quote(__FILE__)])); $backtrace[2] = $backtrace[0]; - $this->assertTrue(BacktraceIgnoreMatcher::isIgnoredByFile($backtrace, [$file])); + $this->assertTrue(BacktraceIgnoreMatcher::isIgnoredByFile($backtrace, [preg_quote($file)])); $this->assertTrue( - BacktraceIgnoreMatcher::isIgnoredByFile($backtrace, [dirname($file) . DIRECTORY_SEPARATOR . '*']) + BacktraceIgnoreMatcher::isIgnoredByFile( + $backtrace, + [preg_quote(dirname($file) . DIRECTORY_SEPARATOR) . '*'] + ) ); - $this->assertFalse(BacktraceIgnoreMatcher::isIgnoredByFile($backtrace, [__FILE__])); + $this->assertFalse(BacktraceIgnoreMatcher::isIgnoredByFile($backtrace, [preg_quote(__FILE__)])); } public function testStringMatches(): void