• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

Yoast / PHPUnit-Polyfills / 16579531037

28 Jul 2025 08:25PM UTC coverage: 63.368% (-32.5%) from 95.846%
16579531037

push

github

jrfnl
Merge branch '1.x' into 2.x

365 of 576 relevant lines covered (63.37%)

17.41 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/Polyfills/ExpectExceptionMessageMatches.php
1
<?php
2

3
namespace Yoast\PHPUnitPolyfills\Polyfills;
4

5
/**
6
 * Polyfill the TestCase::expectExceptionMessageMatches() method, which replaces
7
 * the TestCase::expectExceptionMessageRegExp() method.
8
 *
9
 * Introduced in PHPUnit 8.4.0.
10
 * The `TestCase::expectExceptionMessageRegExp()` method was soft deprecated in PHPUnit 8.4.0,
11
 * hard deprecated in PHPUnit 8.5.3 and removed in PHPUnit 9.0.0.
12
 *
13
 * @link https://github.com/sebastianbergmann/phpunit/commit/d1199cb2e43a934b51521656be9748f63febe18e
14
 * @link https://github.com/sebastianbergmann/phpunit/issues/4133
15
 * @link https://github.com/sebastianbergmann/phpunit/issues/3957
16
 *
17
 * @since 0.1.0
18
 */
19
trait ExpectExceptionMessageMatches {
20

21
        /**
22
         * Set an expectation that an Exception message matches a pattern as per the regular expression.
23
         *
24
         * @param string $regularExpression The regular expression.
25
         *
26
         * @return void
27
         */
28
        final public function expectExceptionMessageMatches( $regularExpression ) {
×
29
                $this->expectExceptionMessageRegExp( $regularExpression );
×
30
        }
31
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc