1
0
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:
Tyson Andre 2018-01-11 14:35:28 -08:00 committed by Matthew Brown
parent 4ea1eb3e2c
commit 43e8703a2e
3 changed files with 3 additions and 3 deletions

View File

@ -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

View File

@ -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',

View File

@ -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',