@@ -1224,45 +1224,6 @@ final protected function registerFailureType(string $classOrInterface): void
1224
1224
$ this ->failureTypes [$ classOrInterface ] = true ;
1225
1225
}
1226
1226
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
-
1266
1227
/**
1267
1228
* This method is a wrapper for the ini_set() function that automatically
1268
1229
* resets the modified php.ini setting to its original value after the
@@ -1681,6 +1642,43 @@ protected function onNotSuccessfulTest(Throwable $t): never
1681
1642
throw $ t ;
1682
1643
}
1683
1644
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
+
1684
1682
/**
1685
1683
* @throws ExpectationFailedException
1686
1684
*/
0 commit comments