@@ -1224,45 +1224,6 @@ final protected function registerFailureType(string $classOrInterface): void
12241224 $ this ->failureTypes [$ classOrInterface ] = true ;
12251225 }
12261226
1227- /**
1228- * @throws AssertionFailedError
1229- * @throws Exception
1230- * @throws ExpectationFailedException
1231- * @throws Throwable
1232- *
1233- * @internal This method is not covered by the backward compatibility promise for PHPUnit
1234- */
1235- final protected function runTest (): mixed
1236- {
1237- $ testArguments = array_merge ($ this ->data , array_values ($ this ->dependencyInput ));
1238- $ positionalArguments = [];
1239- $ namedArguments = [];
1240-
1241- foreach ($ testArguments as $ key => $ value ) {
1242- if (is_int ($ key )) {
1243- $ positionalArguments [] = $ value ;
1244- } else {
1245- $ namedArguments [$ key ] = $ value ;
1246- }
1247- }
1248-
1249- try {
1250- $ testResult = $ this ->{$ this ->methodName }(...$ namedArguments , ...$ positionalArguments );
1251- } catch (Throwable $ exception ) {
1252- if (!$ this ->shouldExceptionExpectationsBeVerified ($ exception )) {
1253- throw $ exception ;
1254- }
1255-
1256- $ this ->verifyExceptionExpectations ($ exception );
1257-
1258- return null ;
1259- }
1260-
1261- $ this ->expectedExceptionWasNotRaised ();
1262-
1263- return $ testResult ;
1264- }
1265-
12661227 /**
12671228 * This method is a wrapper for the ini_set() function that automatically
12681229 * resets the modified php.ini setting to its original value after the
@@ -1681,6 +1642,43 @@ protected function onNotSuccessfulTest(Throwable $t): never
16811642 throw $ t ;
16821643 }
16831644
1645+ /**
1646+ * @throws AssertionFailedError
1647+ * @throws Exception
1648+ * @throws ExpectationFailedException
1649+ * @throws Throwable
1650+ */
1651+ private function runTest (): mixed
1652+ {
1653+ $ testArguments = array_merge ($ this ->data , array_values ($ this ->dependencyInput ));
1654+ $ positionalArguments = [];
1655+ $ namedArguments = [];
1656+
1657+ foreach ($ testArguments as $ key => $ value ) {
1658+ if (is_int ($ key )) {
1659+ $ positionalArguments [] = $ value ;
1660+ } else {
1661+ $ namedArguments [$ key ] = $ value ;
1662+ }
1663+ }
1664+
1665+ try {
1666+ $ testResult = $ this ->{$ this ->methodName }(...$ namedArguments , ...$ positionalArguments );
1667+ } catch (Throwable $ exception ) {
1668+ if (!$ this ->shouldExceptionExpectationsBeVerified ($ exception )) {
1669+ throw $ exception ;
1670+ }
1671+
1672+ $ this ->verifyExceptionExpectations ($ exception );
1673+
1674+ return null ;
1675+ }
1676+
1677+ $ this ->expectedExceptionWasNotRaised ();
1678+
1679+ return $ testResult ;
1680+ }
1681+
16841682 /**
16851683 * @throws ExpectationFailedException
16861684 */
0 commit comments