Skip to content
Permalink
Browse files

expectExceptionMessageRegExp() is a horrible method name

  • Loading branch information...
sebastianbergmann committed Aug 3, 2019
1 parent 1ba2e3e commit d1199cb2e43a934b51521656be9748f63febe18e
Showing with 14 additions and 2 deletions.
  1. +4 −0 ChangeLog-8.4.md
  2. +10 −2 src/Framework/TestCase.php
@@ -8,5 +8,9 @@ All notable changes of the PHPUnit 8.4 release series are documented in this fil

* Implemented [#3775](https://github.com/sebastianbergmann/phpunit/issues/3775): Explicit API for expecting PHP errors, warnings, and notices

### Changed

* The method `expectExceptionMessageRegExp()` is now deprecated. There is no behavioral change in this version of PHPUnit. Using this method will trigger a deprecation warning in PHPUnit 9 and in PHPUnit 10 it will be removed. Please use `expectExceptionMessageMatches()` instead.

[8.4.0]: https://github.com/sebastianbergmann/phpunit/compare/8.3...8.4.0

@@ -493,9 +493,17 @@ public function expectExceptionMessage(string $message): void
$this->expectedExceptionMessage = $message;
}
public function expectExceptionMessageRegExp(string $messageRegExp): void
public function expectExceptionMessageMatches(string $regularExpression): void
{
$this->expectedExceptionMessageRegExp = $messageRegExp;
$this->expectedExceptionMessageRegExp = $regularExpression;
}
/**
* @deprecated Use expectExceptionMessageMatches() instead
*/
public function expectExceptionMessageRegExp(string $regularExpression): void
{
$this->expectExceptionMessageMatches($regularExpression);
}
/**

0 comments on commit d1199cb

Please sign in to comment.
You can’t perform that action at this time.