Skip to content

[PHPUnit 13] Fix class in expectExceptionMessage() rename to TestCase - #735

Merged
TomasVotruba merged 2 commits into
mainfrom
fix-phpunit13-expect-exception-message-class
Jul 30, 2026
Merged

[PHPUnit 13] Fix class in expectExceptionMessage() rename to TestCase#735
TomasVotruba merged 2 commits into
mainfrom
fix-phpunit13-expect-exception-message-class

Conversation

@TomasVotruba

Copy link
Copy Markdown
Member

The PHPUNIT_130 set renamed expectExceptionMessage() on PHPUnit\Framework\TestClass — a class that does not exist. The rename never applied.

Fixed to PHPUnit\Framework\TestCase, so the set now handles the phpunit#6560 soft deprecation (PHPUnit 13.2):

 final class SomeTest extends TestCase
 {
     public function test(): void
     {
-        $this->expectExceptionMessage('some message');
+        $this->expectExceptionMessageIsOrContains('some message');
     }
 }

TomasVotruba and others added 2 commits July 30, 2026 11:47
MethodCallRename used PHPUnit\Framework\TestClass, which does not exist,
so the rename never applied.
@TomasVotruba
TomasVotruba merged commit bb342e2 into main Jul 30, 2026
7 checks passed
@TomasVotruba
TomasVotruba deleted the fix-phpunit13-expect-exception-message-class branch July 30, 2026 09:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants