classSpecificationTable
final class SpecificationTable
Renders the spec report: one row per item with its statement, result and passing / linked targets, followed by the failure messages.
Methods§
public function render(
SymfonyStyle $io,
OutputInterface $output,
array<string, mixed> $report,
): voidRenders the specification table and the messages of failed items.
Parameters
$io | SymfonyStyle | The console style |
$output | OutputInterface | Receives the table |
$report | array<string, mixed> | The spec report |
Throws
InvalidInputException When a row does not have the shape of a specification recordTest cases 4
Called from 1
Calls 7
- static-call Fields::mapping() line 32
- static-call Text::plain() line 34
- static-call Fields::strings() line 39
- function-call
implodeline 41 - method-call SpecificationTable::table() line 49
- method-call
SymfonyStyle::text()line 50 - function-call
countline 50
public function table(
OutputInterface $output,
list<string> $headers,
list<list<string>> $rows,
): voidRenders rows with the statement column wrapped to the terminal width.
Parameters
$output | OutputInterface | Receives the table |
$headers | list<string> | The ID, statement, result and tests headers |
$rows | list<list<string>> | The rows |
Test cases 3
Called from 1
Test cases 11§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 7
SpecificationTableTest::testRenderEscapesMarkupAndRemovesControlCharacterscallsSpecificationTableTest::testRenderRejectsRowsThatAreNotSpecificationRecordscallsSpecificationTableTest::testRenderShowsAnEmptyTablecallsSpecificationTableTest::testRenderShowsOneRowPerItemAndTheFailureMessagescallsSpecificationTableTest::testTableCapsTheIdResultAndTestColumnscallsSpecificationTableTest::testTableSizesColumnsByTheirHeaderscallsSpecificationTableTest::testTableWrapsTheStatementToTheTerminalWidthcalls
Other tests reaching this symbol 4
SpecCommandTestcallsApplicationTestcallsCommandHandlerTestcallsReporterTestcalls