Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/tests' into tests
Browse files Browse the repository at this point in the history
  • Loading branch information
xepozz committed Oct 14, 2023
2 parents 1ed2ddf + 6813542 commit d04e17b
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions tests/Unit/Helper/BacktraceIgnoreMatcherTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d04e17b

Please sign in to comment.