@@ -1170,37 +1170,6 @@ final protected function registerFailureType(string $classOrInterface): void
11701170 $ this ->failureTypes [$ classOrInterface ] = true ;
11711171 }
11721172
1173- /**
1174- * @throws AssertionFailedError
1175- * @throws Exception
1176- * @throws ExpectationFailedException
1177- * @throws Throwable
1178- *
1179- * @internal This method is not covered by the backward compatibility promise for PHPUnit
1180- */
1181- protected function runTest (): mixed
1182- {
1183- $ testArguments = array_merge ($ this ->data , $ this ->dependencyInput );
1184-
1185- $ this ->registerMockObjectsFromTestArguments ($ testArguments );
1186-
1187- try {
1188- $ testResult = $ this ->{$ this ->name }(...array_values ($ testArguments ));
1189- } catch (Throwable $ exception ) {
1190- if (!$ this ->shouldExceptionExpectationsBeVerified ($ exception )) {
1191- throw $ exception ;
1192- }
1193-
1194- $ this ->verifyExceptionExpectations ($ exception );
1195-
1196- return null ;
1197- }
1198-
1199- $ this ->expectedExceptionWasNotRaised ();
1200-
1201- return $ testResult ;
1202- }
1203-
12041173 /**
12051174 * This method is a wrapper for the ini_set() function that automatically
12061175 * resets the modified php.ini setting to its original value after the
@@ -1563,6 +1532,35 @@ protected function onNotSuccessfulTest(Throwable $t): never
15631532 throw $ t ;
15641533 }
15651534
1535+ /**
1536+ * @throws AssertionFailedError
1537+ * @throws Exception
1538+ * @throws ExpectationFailedException
1539+ * @throws Throwable
1540+ */
1541+ private function runTest (): mixed
1542+ {
1543+ $ testArguments = array_merge ($ this ->data , $ this ->dependencyInput );
1544+
1545+ $ this ->registerMockObjectsFromTestArguments ($ testArguments );
1546+
1547+ try {
1548+ $ testResult = $ this ->{$ this ->name }(...array_values ($ testArguments ));
1549+ } catch (Throwable $ exception ) {
1550+ if (!$ this ->shouldExceptionExpectationsBeVerified ($ exception )) {
1551+ throw $ exception ;
1552+ }
1553+
1554+ $ this ->verifyExceptionExpectations ($ exception );
1555+
1556+ return null ;
1557+ }
1558+
1559+ $ this ->expectedExceptionWasNotRaised ();
1560+
1561+ return $ testResult ;
1562+ }
1563+
15661564 /**
15671565 * @throws Throwable
15681566 */
0 commit comments