feat: basic PHPUnit 10 support

This commit is contained in:
Nuno Maduro
2021-10-24 01:03:18 +01:00
parent de46ee0f64
commit cf47b45262
32 changed files with 807 additions and 549 deletions

View File

@ -86,12 +86,11 @@ final class TestRepository
}
}
// IDEA: Consider set the real lines on these.
$testCase->factoryProxies->add($filename, 0, 'addGroups', [$groups]);
$testCase->factoryProxies->add($filename, 0, 'addBeforeAll', [$hooks[0] ?? null]);
$testCase->factoryProxies->add($filename, 0, 'addBeforeEach', [$hooks[1] ?? null]);
$testCase->factoryProxies->add($filename, 0, 'addAfterEach', [$hooks[2] ?? null]);
$testCase->factoryProxies->add($filename, 0, 'addAfterAll', [$hooks[3] ?? null]);
$testCase->factoryProxies->add($filename, 0, '__addBeforeAll', [$hooks[0] ?? null]);
$testCase->factoryProxies->add($filename, 0, '__addBeforeEach', [$hooks[1] ?? null]);
$testCase->factoryProxies->add($filename, 0, '__addAfterEach', [$hooks[2] ?? null]);
$testCase->factoryProxies->add($filename, 0, '__addAfterAll', [$hooks[3] ?? null]);
}
};
@ -171,7 +170,7 @@ final class TestRepository
throw new TestAlreadyExist($test->filename, $test->description);
}
if (!$test->receivesArguments()) {
if (!$test->__receivesArguments()) {
$arguments = Reflection::getFunctionArguments($test->test);
if (count($arguments) > 0) {