diff --git a/tests/end-to-end/event/_files/DeprecatedFeatureTest.php b/tests/end-to-end/event/_files/DeprecatedFeatureTest.php index 6f8369829a3..8cdf64d4f7f 100644 --- a/tests/end-to-end/event/_files/DeprecatedFeatureTest.php +++ b/tests/end-to-end/event/_files/DeprecatedFeatureTest.php @@ -10,6 +10,7 @@ namespace PHPUnit\TestFixture\Event; use const E_USER_DEPRECATED; +use function error_get_last; use function trigger_error; use PHPUnit\Framework\TestCase; @@ -22,4 +23,11 @@ public function testDeprecatedFeature(): void $this->assertTrue(true); } + + public function testDeprecatedSuppressedErrorGetLast(): void + { + $this->assertNull(error_get_last()); + @trigger_error('message', E_USER_DEPRECATED); + $this->assertIsArray(error_get_last()); + } } diff --git a/tests/end-to-end/event/_files/IgnoreDeprecationsTest.php b/tests/end-to-end/event/_files/IgnoreDeprecationsTest.php index a44c5c82d62..23fed1fc09e 100644 --- a/tests/end-to-end/event/_files/IgnoreDeprecationsTest.php +++ b/tests/end-to-end/event/_files/IgnoreDeprecationsTest.php @@ -9,6 +9,7 @@ */ namespace PHPUnit\TestFixture\Event; +use function error_get_last; use function trigger_error; use PHPUnit\Framework\Attributes\IgnoreDeprecations; use PHPUnit\Framework\TestCase; @@ -29,4 +30,19 @@ public function testTwo(): void $this->assertTrue(true); } + + #[IgnoreDeprecations] + public function testOneErrorGetLast(): void + { + $this->assertNull(error_get_last()); + trigger_error('message', E_USER_DEPRECATED); + $this->assertIsArray(error_get_last()); + } + + public function testTwoErrorGetLast(): void + { + $this->assertNull(error_get_last()); + trigger_error('message', E_USER_DEPRECATED); + $this->assertIsArray(error_get_last()); + } } diff --git a/tests/end-to-end/event/_files/SuppressedUserNoticeTest.php b/tests/end-to-end/event/_files/SuppressedUserNoticeTest.php index 245ce980a4b..0202ce8fb4b 100644 --- a/tests/end-to-end/event/_files/SuppressedUserNoticeTest.php +++ b/tests/end-to-end/event/_files/SuppressedUserNoticeTest.php @@ -9,6 +9,7 @@ */ namespace PHPUnit\TestFixture\Event; +use function error_get_last; use function trigger_error; use PHPUnit\Framework\TestCase; @@ -20,4 +21,11 @@ public function testSuppressedUserNotice(): void @trigger_error('message', E_USER_NOTICE); } + + public function testSuppressedUserNoticeErrorGetLast(): void + { + $this->assertNull(error_get_last()); + @trigger_error('message', E_USER_NOTICE); + $this->assertIsArray(error_get_last()); + } } diff --git a/tests/end-to-end/event/_files/SuppressedUserWarningTest.php b/tests/end-to-end/event/_files/SuppressedUserWarningTest.php index 426746e03c2..f6bbbf93c02 100644 --- a/tests/end-to-end/event/_files/SuppressedUserWarningTest.php +++ b/tests/end-to-end/event/_files/SuppressedUserWarningTest.php @@ -9,6 +9,7 @@ */ namespace PHPUnit\TestFixture\Event; +use function error_get_last; use function trigger_error; use PHPUnit\Framework\TestCase; @@ -20,4 +21,11 @@ public function testSuppressedUserWarning(): void @trigger_error('message', E_USER_WARNING); } + + public function testSuppressedUserWarningErrorGetLast(): void + { + $this->assertNull(error_get_last()); + @trigger_error('message', E_USER_WARNING); + $this->assertIsArray(error_get_last()); + } } diff --git a/tests/end-to-end/event/_files/UserErrorTest.php b/tests/end-to-end/event/_files/UserErrorTest.php index 998a6dc7471..104418c4729 100644 --- a/tests/end-to-end/event/_files/UserErrorTest.php +++ b/tests/end-to-end/event/_files/UserErrorTest.php @@ -20,4 +20,10 @@ public function testUserError(): void trigger_error('message', E_USER_ERROR); } + + public function testUserErrorMustAbortExecution(): void + { + trigger_error('message', E_USER_ERROR); + $this->assertTrue(false); + } } diff --git a/tests/end-to-end/event/_files/UserNoticeTest.php b/tests/end-to-end/event/_files/UserNoticeTest.php index 86fed62b7db..9f310547be1 100644 --- a/tests/end-to-end/event/_files/UserNoticeTest.php +++ b/tests/end-to-end/event/_files/UserNoticeTest.php @@ -9,6 +9,7 @@ */ namespace PHPUnit\TestFixture\Event; +use function error_get_last; use function trigger_error; use PHPUnit\Framework\TestCase; @@ -20,4 +21,11 @@ public function testUserNotice(): void trigger_error('message', E_USER_NOTICE); } + + public function testUserNoticeErrorGetLast(): void + { + $this->assertNull(error_get_last()); + trigger_error('message', E_USER_NOTICE); + $this->assertIsArray(error_get_last()); + } } diff --git a/tests/end-to-end/event/_files/UserWarningTest.php b/tests/end-to-end/event/_files/UserWarningTest.php index 4e75bcbef80..a534e1e18d4 100644 --- a/tests/end-to-end/event/_files/UserWarningTest.php +++ b/tests/end-to-end/event/_files/UserWarningTest.php @@ -9,6 +9,7 @@ */ namespace PHPUnit\TestFixture\Event; +use function error_get_last; use function trigger_error; use PHPUnit\Framework\TestCase; @@ -20,4 +21,11 @@ public function testUserWarning(): void trigger_error('message', E_USER_WARNING); } + + public function testUserWarningErrorGetLast(): void + { + $this->assertNull(error_get_last()); + trigger_error('message', E_USER_WARNING); + $this->assertIsArray(error_get_last()); + } } diff --git a/tests/end-to-end/event/deprecations-can-be-ignored-using-attribute.phpt b/tests/end-to-end/event/deprecations-can-be-ignored-using-attribute.phpt index 5b773174ab4..64c75fdae02 100644 --- a/tests/end-to-end/event/deprecations-can-be-ignored-using-attribute.phpt +++ b/tests/end-to-end/event/deprecations-can-be-ignored-using-attribute.phpt @@ -21,12 +21,12 @@ unlink($traceFile); --EXPECTF-- PHPUnit Started (PHPUnit %s using %s) Test Runner Configured -Test Suite Loaded (2 tests) +Test Suite Loaded (4 tests) Event Facade Sealed Test Runner Started Test Suite Sorted -Test Runner Execution Started (2 tests) -Test Suite Started (PHPUnit\TestFixture\Event\IgnoreDeprecationsTest, 2 tests) +Test Runner Execution Started (4 tests) +Test Suite Started (PHPUnit\TestFixture\Event\IgnoreDeprecationsTest, 4 tests) Test Preparation Started (PHPUnit\TestFixture\Event\IgnoreDeprecationsTest::testOne) Test Prepared (PHPUnit\TestFixture\Event\IgnoreDeprecationsTest::testOne) Test Triggered Test-Ignored Deprecation (PHPUnit\TestFixture\Event\IgnoreDeprecationsTest::testOne) @@ -41,7 +41,33 @@ message Assertion Succeeded (Constraint: is true, Value: true) Test Passed (PHPUnit\TestFixture\Event\IgnoreDeprecationsTest::testTwo) Test Finished (PHPUnit\TestFixture\Event\IgnoreDeprecationsTest::testTwo) -Test Suite Finished (PHPUnit\TestFixture\Event\IgnoreDeprecationsTest, 2 tests) +Test Preparation Started (PHPUnit\TestFixture\Event\IgnoreDeprecationsTest::testOneErrorGetLast) +Test Prepared (PHPUnit\TestFixture\Event\IgnoreDeprecationsTest::testOneErrorGetLast) +Assertion Succeeded (Constraint: is null, Value: {enable export of objects to see this value}) +Test Triggered Test-Ignored Deprecation (PHPUnit\TestFixture\Event\IgnoreDeprecationsTest::testOneErrorGetLast) +message +Assertion Succeeded (Constraint: is of type array, Value: Array &0 [ + 'type' => 16384, + 'message' => 'message', + 'file' => '%s%e_files%eIgnoreDeprecationsTest.php', + 'line' => %d, +]) +Test Passed (PHPUnit\TestFixture\Event\IgnoreDeprecationsTest::testOneErrorGetLast) +Test Finished (PHPUnit\TestFixture\Event\IgnoreDeprecationsTest::testOneErrorGetLast) +Test Preparation Started (PHPUnit\TestFixture\Event\IgnoreDeprecationsTest::testTwoErrorGetLast) +Test Prepared (PHPUnit\TestFixture\Event\IgnoreDeprecationsTest::testTwoErrorGetLast) +Assertion Succeeded (Constraint: is null, Value: {enable export of objects to see this value}) +Test Triggered Deprecation (PHPUnit\TestFixture\Event\IgnoreDeprecationsTest::testTwoErrorGetLast) +message +Assertion Succeeded (Constraint: is of type array, Value: Array &0 [ + 'type' => 16384, + 'message' => 'message', + 'file' => '%s%e_files%eIgnoreDeprecationsTest.php', + 'line' => %d, +]) +Test Passed (PHPUnit\TestFixture\Event\IgnoreDeprecationsTest::testTwoErrorGetLast) +Test Finished (PHPUnit\TestFixture\Event\IgnoreDeprecationsTest::testTwoErrorGetLast) +Test Suite Finished (PHPUnit\TestFixture\Event\IgnoreDeprecationsTest, 4 tests) Test Runner Execution Finished Test Runner Finished PHPUnit Finished (Shell Exit Code: 0) diff --git a/tests/end-to-end/event/suppressed-user-notice.phpt b/tests/end-to-end/event/suppressed-user-notice.phpt index 9fd5ec3e275..84c6c110632 100644 --- a/tests/end-to-end/event/suppressed-user-notice.phpt +++ b/tests/end-to-end/event/suppressed-user-notice.phpt @@ -21,12 +21,12 @@ unlink($traceFile); --EXPECTF-- PHPUnit Started (PHPUnit %s using %s) Test Runner Configured -Test Suite Loaded (1 test) +Test Suite Loaded (2 tests) Event Facade Sealed Test Runner Started Test Suite Sorted -Test Runner Execution Started (1 test) -Test Suite Started (PHPUnit\TestFixture\Event\SuppressedUserNoticeTest, 1 test) +Test Runner Execution Started (2 tests) +Test Suite Started (PHPUnit\TestFixture\Event\SuppressedUserNoticeTest, 2 tests) Test Preparation Started (PHPUnit\TestFixture\Event\SuppressedUserNoticeTest::testSuppressedUserNotice) Test Prepared (PHPUnit\TestFixture\Event\SuppressedUserNoticeTest::testSuppressedUserNotice) Assertion Succeeded (Constraint: is true, Value: true) @@ -34,7 +34,20 @@ Test Triggered Suppressed Notice (PHPUnit\TestFixture\Event\SuppressedUserNotice message Test Passed (PHPUnit\TestFixture\Event\SuppressedUserNoticeTest::testSuppressedUserNotice) Test Finished (PHPUnit\TestFixture\Event\SuppressedUserNoticeTest::testSuppressedUserNotice) -Test Suite Finished (PHPUnit\TestFixture\Event\SuppressedUserNoticeTest, 1 test) +Test Preparation Started (PHPUnit\TestFixture\Event\SuppressedUserNoticeTest::testSuppressedUserNoticeErrorGetLast) +Test Prepared (PHPUnit\TestFixture\Event\SuppressedUserNoticeTest::testSuppressedUserNoticeErrorGetLast) +Assertion Succeeded (Constraint: is null, Value: {enable export of objects to see this value}) +Test Triggered Suppressed Notice (PHPUnit\TestFixture\Event\SuppressedUserNoticeTest::testSuppressedUserNoticeErrorGetLast) +message +Assertion Succeeded (Constraint: is of type array, Value: Array &0 [ + 'type' => 1024, + 'message' => 'message', + 'file' => '%s%e_files%eSuppressedUserNoticeTest.php', + 'line' => %d, +]) +Test Passed (PHPUnit\TestFixture\Event\SuppressedUserNoticeTest::testSuppressedUserNoticeErrorGetLast) +Test Finished (PHPUnit\TestFixture\Event\SuppressedUserNoticeTest::testSuppressedUserNoticeErrorGetLast) +Test Suite Finished (PHPUnit\TestFixture\Event\SuppressedUserNoticeTest, 2 tests) Test Runner Execution Finished Test Runner Finished PHPUnit Finished (Shell Exit Code: 0) diff --git a/tests/end-to-end/event/suppressed-user-warning.phpt b/tests/end-to-end/event/suppressed-user-warning.phpt index 0e7669d939b..c79c052fa19 100644 --- a/tests/end-to-end/event/suppressed-user-warning.phpt +++ b/tests/end-to-end/event/suppressed-user-warning.phpt @@ -21,12 +21,12 @@ unlink($traceFile); --EXPECTF-- PHPUnit Started (PHPUnit %s using %s) Test Runner Configured -Test Suite Loaded (1 test) +Test Suite Loaded (2 tests) Event Facade Sealed Test Runner Started Test Suite Sorted -Test Runner Execution Started (1 test) -Test Suite Started (PHPUnit\TestFixture\Event\SuppressedUserWarningTest, 1 test) +Test Runner Execution Started (2 tests) +Test Suite Started (PHPUnit\TestFixture\Event\SuppressedUserWarningTest, 2 tests) Test Preparation Started (PHPUnit\TestFixture\Event\SuppressedUserWarningTest::testSuppressedUserWarning) Test Prepared (PHPUnit\TestFixture\Event\SuppressedUserWarningTest::testSuppressedUserWarning) Assertion Succeeded (Constraint: is true, Value: true) @@ -34,7 +34,20 @@ Test Triggered Suppressed Warning (PHPUnit\TestFixture\Event\SuppressedUserWarni message Test Passed (PHPUnit\TestFixture\Event\SuppressedUserWarningTest::testSuppressedUserWarning) Test Finished (PHPUnit\TestFixture\Event\SuppressedUserWarningTest::testSuppressedUserWarning) -Test Suite Finished (PHPUnit\TestFixture\Event\SuppressedUserWarningTest, 1 test) +Test Preparation Started (PHPUnit\TestFixture\Event\SuppressedUserWarningTest::testSuppressedUserWarningErrorGetLast) +Test Prepared (PHPUnit\TestFixture\Event\SuppressedUserWarningTest::testSuppressedUserWarningErrorGetLast) +Assertion Succeeded (Constraint: is null, Value: {enable export of objects to see this value}) +Test Triggered Suppressed Warning (PHPUnit\TestFixture\Event\SuppressedUserWarningTest::testSuppressedUserWarningErrorGetLast) +message +Assertion Succeeded (Constraint: is of type array, Value: Array &0 [ + 'type' => 512, + 'message' => 'message', + 'file' => '%s%e_files%eSuppressedUserWarningTest.php', + 'line' => %d, +]) +Test Passed (PHPUnit\TestFixture\Event\SuppressedUserWarningTest::testSuppressedUserWarningErrorGetLast) +Test Finished (PHPUnit\TestFixture\Event\SuppressedUserWarningTest::testSuppressedUserWarningErrorGetLast) +Test Suite Finished (PHPUnit\TestFixture\Event\SuppressedUserWarningTest, 2 tests) Test Runner Execution Finished Test Runner Finished PHPUnit Finished (Shell Exit Code: 0) diff --git a/tests/end-to-end/event/user-deprecated.phpt b/tests/end-to-end/event/user-deprecated.phpt index 039bde2e4d0..ee9e582ef0e 100644 --- a/tests/end-to-end/event/user-deprecated.phpt +++ b/tests/end-to-end/event/user-deprecated.phpt @@ -21,12 +21,12 @@ unlink($traceFile); --EXPECTF-- PHPUnit Started (PHPUnit %s using %s) Test Runner Configured -Test Suite Loaded (1 test) +Test Suite Loaded (2 tests) Event Facade Sealed Test Runner Started Test Suite Sorted -Test Runner Execution Started (1 test) -Test Suite Started (PHPUnit\TestFixture\Event\DeprecatedFeatureTest, 1 test) +Test Runner Execution Started (2 tests) +Test Suite Started (PHPUnit\TestFixture\Event\DeprecatedFeatureTest, 2 tests) Test Preparation Started (PHPUnit\TestFixture\Event\DeprecatedFeatureTest::testDeprecatedFeature) Test Prepared (PHPUnit\TestFixture\Event\DeprecatedFeatureTest::testDeprecatedFeature) Test Triggered Deprecation (PHPUnit\TestFixture\Event\DeprecatedFeatureTest::testDeprecatedFeature) @@ -36,7 +36,20 @@ message Assertion Succeeded (Constraint: is true, Value: true) Test Passed (PHPUnit\TestFixture\Event\DeprecatedFeatureTest::testDeprecatedFeature) Test Finished (PHPUnit\TestFixture\Event\DeprecatedFeatureTest::testDeprecatedFeature) -Test Suite Finished (PHPUnit\TestFixture\Event\DeprecatedFeatureTest, 1 test) +Test Preparation Started (PHPUnit\TestFixture\Event\DeprecatedFeatureTest::testDeprecatedSuppressedErrorGetLast) +Test Prepared (PHPUnit\TestFixture\Event\DeprecatedFeatureTest::testDeprecatedSuppressedErrorGetLast) +Assertion Succeeded (Constraint: is null, Value: {enable export of objects to see this value}) +Test Triggered Suppressed Deprecation (PHPUnit\TestFixture\Event\DeprecatedFeatureTest::testDeprecatedSuppressedErrorGetLast) +message +Assertion Succeeded (Constraint: is of type array, Value: Array &0 [ + 'type' => 16384, + 'message' => 'message', + 'file' => '%s%e_files%eDeprecatedFeatureTest.php', + 'line' => %d, +]) +Test Passed (PHPUnit\TestFixture\Event\DeprecatedFeatureTest::testDeprecatedSuppressedErrorGetLast) +Test Finished (PHPUnit\TestFixture\Event\DeprecatedFeatureTest::testDeprecatedSuppressedErrorGetLast) +Test Suite Finished (PHPUnit\TestFixture\Event\DeprecatedFeatureTest, 2 tests) Test Runner Execution Finished Test Runner Finished PHPUnit Finished (Shell Exit Code: 0) diff --git a/tests/end-to-end/event/user-error.phpt b/tests/end-to-end/event/user-error.phpt index ce8e5cc6efd..a6cbcd69ff3 100644 --- a/tests/end-to-end/event/user-error.phpt +++ b/tests/end-to-end/event/user-error.phpt @@ -21,12 +21,12 @@ unlink($traceFile); --EXPECTF-- PHPUnit Started (PHPUnit %s using %s) Test Runner Configured -Test Suite Loaded (1 test) +Test Suite Loaded (2 tests) Event Facade Sealed Test Runner Started Test Suite Sorted -Test Runner Execution Started (1 test) -Test Suite Started (PHPUnit\TestFixture\Event\UserErrorTest, 1 test) +Test Runner Execution Started (2 tests) +Test Suite Started (PHPUnit\TestFixture\Event\UserErrorTest, 2 tests) Test Preparation Started (PHPUnit\TestFixture\Event\UserErrorTest::testUserError) Test Prepared (PHPUnit\TestFixture\Event\UserErrorTest::testUserError) Assertion Succeeded (Constraint: is true, Value: true) @@ -35,7 +35,14 @@ message Test Errored (PHPUnit\TestFixture\Event\UserErrorTest::testUserError) Any E_*_ERROR must abort execution Test Finished (PHPUnit\TestFixture\Event\UserErrorTest::testUserError) -Test Suite Finished (PHPUnit\TestFixture\Event\UserErrorTest, 1 test) +Test Preparation Started (PHPUnit\TestFixture\Event\UserErrorTest::testUserErrorMustAbortExecution) +Test Prepared (PHPUnit\TestFixture\Event\UserErrorTest::testUserErrorMustAbortExecution) +Test Triggered Error (PHPUnit\TestFixture\Event\UserErrorTest::testUserErrorMustAbortExecution) +message +Test Errored (PHPUnit\TestFixture\Event\UserErrorTest::testUserErrorMustAbortExecution) +Any E_*_ERROR must abort execution +Test Finished (PHPUnit\TestFixture\Event\UserErrorTest::testUserErrorMustAbortExecution) +Test Suite Finished (PHPUnit\TestFixture\Event\UserErrorTest, 2 tests) Test Runner Execution Finished Test Runner Finished PHPUnit Finished (Shell Exit Code: 2) diff --git a/tests/end-to-end/event/user-notice.phpt b/tests/end-to-end/event/user-notice.phpt index a731096bd48..b5383c757a9 100644 --- a/tests/end-to-end/event/user-notice.phpt +++ b/tests/end-to-end/event/user-notice.phpt @@ -21,12 +21,12 @@ unlink($traceFile); --EXPECTF-- PHPUnit Started (PHPUnit %s using %s) Test Runner Configured -Test Suite Loaded (1 test) +Test Suite Loaded (2 tests) Event Facade Sealed Test Runner Started Test Suite Sorted -Test Runner Execution Started (1 test) -Test Suite Started (PHPUnit\TestFixture\Event\UserNoticeTest, 1 test) +Test Runner Execution Started (2 tests) +Test Suite Started (PHPUnit\TestFixture\Event\UserNoticeTest, 2 tests) Test Preparation Started (PHPUnit\TestFixture\Event\UserNoticeTest::testUserNotice) Test Prepared (PHPUnit\TestFixture\Event\UserNoticeTest::testUserNotice) Assertion Succeeded (Constraint: is true, Value: true) @@ -34,7 +34,20 @@ Test Triggered Notice (PHPUnit\TestFixture\Event\UserNoticeTest::testUserNotice) message Test Passed (PHPUnit\TestFixture\Event\UserNoticeTest::testUserNotice) Test Finished (PHPUnit\TestFixture\Event\UserNoticeTest::testUserNotice) -Test Suite Finished (PHPUnit\TestFixture\Event\UserNoticeTest, 1 test) +Test Preparation Started (PHPUnit\TestFixture\Event\UserNoticeTest::testUserNoticeErrorGetLast) +Test Prepared (PHPUnit\TestFixture\Event\UserNoticeTest::testUserNoticeErrorGetLast) +Assertion Succeeded (Constraint: is null, Value: {enable export of objects to see this value}) +Test Triggered Notice (PHPUnit\TestFixture\Event\UserNoticeTest::testUserNoticeErrorGetLast) +message +Assertion Succeeded (Constraint: is of type array, Value: Array &0 [ + 'type' => 1024, + 'message' => 'message', + 'file' => '%s%e_files%eUserNoticeTest.php', + 'line' => %d, +]) +Test Passed (PHPUnit\TestFixture\Event\UserNoticeTest::testUserNoticeErrorGetLast) +Test Finished (PHPUnit\TestFixture\Event\UserNoticeTest::testUserNoticeErrorGetLast) +Test Suite Finished (PHPUnit\TestFixture\Event\UserNoticeTest, 2 tests) Test Runner Execution Finished Test Runner Finished PHPUnit Finished (Shell Exit Code: 0) diff --git a/tests/end-to-end/event/user-warning.phpt b/tests/end-to-end/event/user-warning.phpt index 3cfde783a26..dccf7c4d784 100644 --- a/tests/end-to-end/event/user-warning.phpt +++ b/tests/end-to-end/event/user-warning.phpt @@ -21,12 +21,12 @@ unlink($traceFile); --EXPECTF-- PHPUnit Started (PHPUnit %s using %s) Test Runner Configured -Test Suite Loaded (1 test) +Test Suite Loaded (2 tests) Event Facade Sealed Test Runner Started Test Suite Sorted -Test Runner Execution Started (1 test) -Test Suite Started (PHPUnit\TestFixture\Event\UserWarningTest, 1 test) +Test Runner Execution Started (2 tests) +Test Suite Started (PHPUnit\TestFixture\Event\UserWarningTest, 2 tests) Test Preparation Started (PHPUnit\TestFixture\Event\UserWarningTest::testUserWarning) Test Prepared (PHPUnit\TestFixture\Event\UserWarningTest::testUserWarning) Assertion Succeeded (Constraint: is true, Value: true) @@ -34,7 +34,20 @@ Test Triggered Warning (PHPUnit\TestFixture\Event\UserWarningTest::testUserWarni message Test Passed (PHPUnit\TestFixture\Event\UserWarningTest::testUserWarning) Test Finished (PHPUnit\TestFixture\Event\UserWarningTest::testUserWarning) -Test Suite Finished (PHPUnit\TestFixture\Event\UserWarningTest, 1 test) +Test Preparation Started (PHPUnit\TestFixture\Event\UserWarningTest::testUserWarningErrorGetLast) +Test Prepared (PHPUnit\TestFixture\Event\UserWarningTest::testUserWarningErrorGetLast) +Assertion Succeeded (Constraint: is null, Value: {enable export of objects to see this value}) +Test Triggered Warning (PHPUnit\TestFixture\Event\UserWarningTest::testUserWarningErrorGetLast) +message +Assertion Succeeded (Constraint: is of type array, Value: Array &0 [ + 'type' => 512, + 'message' => 'message', + 'file' => '%s%e_files%eUserWarningTest.php', + 'line' => %d, +]) +Test Passed (PHPUnit\TestFixture\Event\UserWarningTest::testUserWarningErrorGetLast) +Test Finished (PHPUnit\TestFixture\Event\UserWarningTest::testUserWarningErrorGetLast) +Test Suite Finished (PHPUnit\TestFixture\Event\UserWarningTest, 2 tests) Test Runner Execution Finished Test Runner Finished PHPUnit Finished (Shell Exit Code: 0) diff --git a/tests/end-to-end/generic/deprecations-can-be-ignored-using-attribute.phpt b/tests/end-to-end/generic/deprecations-can-be-ignored-using-attribute.phpt index a08eb198123..98c217e3420 100644 --- a/tests/end-to-end/generic/deprecations-can-be-ignored-using-attribute.phpt +++ b/tests/end-to-end/generic/deprecations-can-be-ignored-using-attribute.phpt @@ -15,11 +15,11 @@ PHPUnit %s by Sebastian Bergmann and contributors. Runtime: %s -.D 2 / 2 (100%) +.D.D 4 / 4 (100%) Time: %s, Memory: %s -1 test triggered 1 deprecation: +2 tests triggered 2 deprecations: 1) %sIgnoreDeprecationsTest.php:%d message @@ -29,5 +29,13 @@ Triggered by: * PHPUnit\TestFixture\Event\IgnoreDeprecationsTest::testTwo %sIgnoreDeprecationsTest.php:%d +2) %sIgnoreDeprecationsTest.php:%d +message + +Triggered by: + +* PHPUnit\TestFixture\Event\IgnoreDeprecationsTest::testTwoErrorGetLast + %sIgnoreDeprecationsTest.php:%d + OK, but there were issues! -Tests: 2, Assertions: 2, Deprecations: 1. +Tests: 4, Assertions: 6, Deprecations: 2.