diff --git a/custom-standards/Flyeralarm/Sniffs/Docblock/ExpectedExceptionMessageSniff.php b/custom-standards/Flyeralarm/Sniffs/Docblock/ExpectedExceptionMessageSniff.php index 50c0cfc..1c5ca32 100644 --- a/custom-standards/Flyeralarm/Sniffs/Docblock/ExpectedExceptionMessageSniff.php +++ b/custom-standards/Flyeralarm/Sniffs/Docblock/ExpectedExceptionMessageSniff.php @@ -25,7 +25,8 @@ public function process(File $phpcsFile, $stackPtr) if (!$this->hasAnnotationInDoc($phpcsFile, $stackPtr, '@expectedException')) { return; } - if ($this->hasAnnotationInDoc($phpcsFile, $stackPtr, '@expectedExceptionMessage')) { + if ($this->hasAnnotationInDoc($phpcsFile, $stackPtr, '@expectedExceptionMessage') + || $this->hasAnnotationInDoc($phpcsFile, $stackPtr, '@expectedExceptionMessageRegExp')) { return; } diff --git a/tests/rules/doc/allowed/ExpectedExceptionWithExpectedExceptionRegExpMessage.php b/tests/rules/doc/allowed/ExpectedExceptionWithExpectedExceptionRegExpMessage.php new file mode 100644 index 0000000..26d12ea --- /dev/null +++ b/tests/rules/doc/allowed/ExpectedExceptionWithExpectedExceptionRegExpMessage.php @@ -0,0 +1,16 @@ +