Skip to content

Commit 8e227b6

Browse files
zonuexecursoragent
andcommitted
fixup! Do not match ignored error messages repeatedly for multiple paths
Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 7a1a987 commit 8e227b6

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

‎tests/PHPStan/Analyser/AnalyserTest.php‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
use function str_replace;
4242
use function strtoupper;
4343
use function substr;
44+
use const DIRECTORY_SEPARATOR;
4445
use const PHP_OS;
4546

4647
class AnalyserTest extends PHPStanTestCase
@@ -176,7 +177,8 @@ public function testFileWithAnIgnoredErrorIdentifierAndPathWithWrongIdentifier()
176177
$this->assertInstanceOf(Error::class, $result[0]);
177178
$this->assertSame('Fail.', $result[0]->getMessage());
178179
$this->assertInstanceOf(Error::class, $result[1]);
179-
$this->assertSame('Ignored error pattern wrong.identifier in path ' . __DIR__ . '/data/bootstrap-error.php was not matched in reported errors.', $result[1]->getMessage());
180+
$expectedPath = str_replace('/', DIRECTORY_SEPARATOR, __DIR__ . '/data/bootstrap-error.php');
181+
$this->assertSame('Ignored error pattern wrong.identifier in path ' . $expectedPath . ' was not matched in reported errors.', $result[1]->getMessage());
180182
}
181183

182184
public function testIgnoreErrorByPath(): void

0 commit comments

Comments
 (0)