classRegistry
final class Registry
The runner extensions available to a project by name.
"phpunit" and "behat" are built in; configured extension classes are added under their names and may replace a built-in one.
Methods§
public function __construct(array<string, string> $classes = [])Parameters
$classes | array<string, string> | Extension class names by runner extension name |
Throws
InvalidInputException When a class does not implement RunnerExtensionCalls 5
- new PhpUnitRunner line 29
- new BehatRunner line 29
- function-call
is_aline 31 - class-const RunnerExtension::class() line 31
- new InvalidInputException line 32
public function get(string $name): RunnerExtensionReturns the extension registered under a name.
Parameters
$name | string | The runner extension name |
Returns
RunnerExtension The extensionThrows
InvalidInputException When no extension has that nameTest cases 7
RegistryTest::testGetIsNeverReachedForClassesThatAreNotRunnerscallsRegistryTest::testGetRejectsUnknownNamescallsRegistryTest::testGetReturnsAConfiguredExtensionBesideTheBuiltInscallsRegistryTest::testGetReturnsAConfiguredExtensionReplacingABuiltIncallsRegistryTest::testGetReturnsTheBuiltInBehatRunnercallsRegistryTest::testGetReturnsTheBuiltInPhpUnitRunnercallsRegistryTest::testGetReturnsTheSameInstanceEachTimecalls
Called from 2
Calls 1
Private surface 1§
Implementation details, listed for orientation only.
private array<string, RunnerExtension> $extensionsTest cases 19§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 7
RegistryTest::testGetIsNeverReachedForClassesThatAreNotRunnerscallsRegistryTest::testGetRejectsUnknownNamescallsRegistryTest::testGetReturnsAConfiguredExtensionBesideTheBuiltInscallsRegistryTest::testGetReturnsAConfiguredExtensionReplacingABuiltIncallsRegistryTest::testGetReturnsTheBuiltInBehatRunnercallsRegistryTest::testGetReturnsTheBuiltInPhpUnitRunnercallsRegistryTest::testGetReturnsTheSameInstanceEachTimecalls
Other tests reaching this symbol 12
LoaderTestcallsMarkdownDocumentTestcallsApplicationTestcallsCommandHandlerTestcallsCommandLineTestcallsExecutorTestcallsFormatterTestcallsAnalyzerTestcallsCoverageTestcallsSnapshotTestcallsTestExecutionTestcallsVerifierTestcalls