classLinkValidator
final class LinkValidator
Resolves the links between items and from items to runners.
Requirement and related links must name other loaded items, a refined requirement must be a sourced requirement, and every linked test must name a configured runner.
Methods§
public function validate(array<string, Item> $items, array<string, RunnerConfig> $runners): voidChecks every link.
Parameters
$items | array<string, Item> | Every item by ID |
$runners | array<string, RunnerConfig> | Configured runners by name |
Throws
InvalidInputException When a link is dangling, points to the item itself or to the wrong kindTest cases 11
LinkValidatorTest::testValidateAcceptsNoItemscallsLinkValidatorTest::testValidateAcceptsResolvedLinkscallsLinkValidatorTest::testValidateChecksEveryItemcallsLinkValidatorTest::testValidateRejectsMissingRelatedItemcallsLinkValidatorTest::testValidateRejectsMissingRequirementcallsLinkValidatorTest::testValidateRejectsRequirementThatIsNotSourcedcallsLinkValidatorTest::testValidateRejectsRequirementThatIsSpecificationcallsLinkValidatorTest::testValidateRejectsRunnerNamedByExtensioncallsLinkValidatorTest::testValidateRejectsSelfRelationcallsLinkValidatorTest::testValidateRejectsSelfRequirementcallsLinkValidatorTest::testValidateRejectsUnknownRunnercalls
Called from 1
Calls 1
Test cases 22§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 11
LinkValidatorTest::testValidateAcceptsNoItemscallsLinkValidatorTest::testValidateAcceptsResolvedLinkscallsLinkValidatorTest::testValidateChecksEveryItemcallsLinkValidatorTest::testValidateRejectsMissingRelatedItemcallsLinkValidatorTest::testValidateRejectsMissingRequirementcallsLinkValidatorTest::testValidateRejectsRequirementThatIsNotSourcedcallsLinkValidatorTest::testValidateRejectsRequirementThatIsSpecificationcallsLinkValidatorTest::testValidateRejectsRunnerNamedByExtensioncallsLinkValidatorTest::testValidateRejectsSelfRelationcallsLinkValidatorTest::testValidateRejectsSelfRequirementcallsLinkValidatorTest::testValidateRejectsUnknownRunnercalls
Other tests reaching this symbol 11
LoaderTestcallsMarkdownDocumentTestcallsApplicationTestcallsCommandHandlerTestcallsCommandLineTestcallsExecutorTestcallsFormatterTestcallsAnalyzerTestcallsCoverageTestcallsSnapshotTestcallsVerifierTestcalls