chore: refactors exceptions

This commit is contained in:
nuno maduro
2026-08-07 15:26:55 +01:00
parent 42d9b777bf
commit 8c554a81e2
54 changed files with 145 additions and 94 deletions
+3 -3
View File
@@ -33,11 +33,11 @@ test('passes', function (): void {
test('failures 1', function (): void {
expect(function (): void {})->toThrow(RuntimeException::class);
})->throws(ExpectationFailedException::class, 'Exception "'.RuntimeException::class.'" not thrown.');
})->throws(ExpectationFailedException::class, 'Exception ['.RuntimeException::class.'] not thrown.');
test('failures 2', function (): void {
expect(function (): void {})->toThrow(function (RuntimeException $e): void {});
})->throws(ExpectationFailedException::class, 'Exception "'.RuntimeException::class.'" not thrown.');
})->throws(ExpectationFailedException::class, 'Exception ['.RuntimeException::class.'] not thrown.');
test('failures 3', function (): void {
expect(function (): void {
@@ -64,7 +64,7 @@ test('failures 5', function (): void {
test('failures 6', function (): void {
expect(function (): void {})->toThrow('actual message');
})->throws(ExpectationFailedException::class, 'Exception with message "actual message" not thrown');
})->throws(ExpectationFailedException::class, 'Exception with message [actual message] not thrown');
test('failures 7', function (): void {
expect(function (): void {