mirror of
https://github.com/danog/psalm.git
synced 2024-11-26 20:34:47 +01:00
Be strict about matching error messages
This commit is contained in:
parent
4ea1eb3e2c
commit
43e8703a2e
@ -462,7 +462,7 @@ class TraitTest extends TestCase
|
||||
}
|
||||
}',
|
||||
'error_message' => 'MissingPropertyType - src/somefile.php:3 - Property T::$foo does not have a ' .
|
||||
'declared type - consider int|nul',
|
||||
'declared type - consider int|null',
|
||||
],
|
||||
'redefinedTraitMethodInSubclass' => [
|
||||
'<?php
|
||||
|
@ -38,7 +38,7 @@ trait FileCheckerInvalidCodeParseTestTrait
|
||||
}
|
||||
|
||||
$this->expectException('\Psalm\Exception\CodeException');
|
||||
$this->expectExceptionMessageRegexp('/\b' . preg_quote($error_message, '/') . '/');
|
||||
$this->expectExceptionMessageRegexp('/\b' . preg_quote($error_message, '/') . '\b/');
|
||||
|
||||
$this->addFile(
|
||||
self::$src_dir_path . 'somefile.php',
|
||||
|
@ -77,7 +77,7 @@ class UnusedCodeTest extends TestCase
|
||||
}
|
||||
|
||||
$this->expectException('\Psalm\Exception\CodeException');
|
||||
$this->expectExceptionMessageRegexp('/\b' . preg_quote($error_message, '/') . '/');
|
||||
$this->expectExceptionMessageRegexp('/\b' . preg_quote($error_message, '/') . '\b/');
|
||||
|
||||
$this->addFile(
|
||||
self::$src_dir_path . 'somefile.php',
|
||||
|
Loading…
Reference in New Issue
Block a user