classPlanPrinter
final class PlanPrinter
Writes a plan back out in the syntax PlanParser reads.
Relations that share a left end, an operator and its optional markers are printed as one grouped statement, which is how they would most likely have been written by hand.
Methods§
public function print(FixturePlan $plan): stringFormats .
Parameters
$plan | FixturePlan |
Returns
stringTest cases 9
PlanPrinterTest::readingBackWhatWasPrintedGivesTheSameTextcallsPlanPrinterTest::testAStandaloneTableIsWrittenOutAlongsideTheRelationscallsPlanPrinterTest::testDoesNotGroupRelationsWithDifferentOperatorscallsPlanPrinterTest::testDoesNotGroupRelationsWithDifferentOptionalMarkerscallsPlanPrinterTest::testPrintsARelationWithSpacesAroundTheOperatorcallsPlanPrinterTest::testPrintsATableOnlyPlanAsItsTableNamecallsPlanPrinterTest::testPrintsOptionalMarkersOnTheSideTheyBelongTocallsPlanPrinterTest::testRegroupsRelationsThatShareALeftEndcallsPlanPrinterTest::testSeveralStandaloneTablesKeepTheOrderTheyWereNamedIncalls
Called from 1
Calls 14
- function-call
implodeline 22 - function-call
array_mapline 22 - function-call
is_stringline 23 - method-call ChoiceSyntax::print() line 24
- new ChoiceSyntax line 24
- method-call
self::printRelation()line 25 - new
selfline 25 - method-call FixturePlan::parts() line 26
- method-call RelationGroups::group() line 30
- new RelationGroups line 30
- method-call StatementPrinter::printGroup() line 31
- new StatementPrinter line 31
- method-call PlanTables::standaloneTables() line 34
- new PlanTables line 34
public function printRelation(Relation $relation): stringWrite a single relation, without needing a plan to hold it.
Parameters
$relation | Relation |
Returns
stringTest cases 2
Called from 2
Calls 2
- method-call StatementPrinter::printGroup() line 46
- new StatementPrinter line 46
Test cases 57§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 11
PlanPrinterTest::readingBackWhatWasPrintedGivesTheSameTextcallsPlanPrinterTest::testAStandaloneTableIsWrittenOutAlongsideTheRelationscallsPlanPrinterTest::testDoesNotGroupRelationsWithDifferentOperatorscallsPlanPrinterTest::testDoesNotGroupRelationsWithDifferentOptionalMarkerscallsPlanPrinterTest::testPrintRelationIncludesOptionalEndpointMarkerscallsPlanPrinterTest::testPrintsARelationWithSpacesAroundTheOperatorcallsPlanPrinterTest::testPrintsASingleRelationWithoutAPlancallsPlanPrinterTest::testPrintsATableOnlyPlanAsItsTableNamecallsPlanPrinterTest::testPrintsOptionalMarkersOnTheSideTheyBelongTocallsPlanPrinterTest::testRegroupsRelationsThatShareALeftEndcallsPlanPrinterTest::testSeveralStandaloneTablesKeepTheOrderTheyWereNamedIncalls
Other tests reaching this symbol 46
PostgreSqlEndToEndTestcallsSqliteIntegrationTestcallsCaseSelectionTestcallsChoiceBindingsTestcallsChoiceValueExceptionTestcallsInverseRelationsTestcallsResolvedRowTestcallsRowChoicesTestcallsConnectedTablesTestcallsOverrideSpecsTestcallsRecursiveRelationExceptionTestcallsRelationCountsTestcallsRelationProjectionTestcallsRelationValueExceptionTestcallsRowBindingsTestcallsRowMaterializerTestcallsGenerationRunTestcallsPlanGeneratorTestcallsPlanSchemaExceptionTestcallsPlanSchemaValidatorTestcallsEndpointValidatorTestcallsConstructorHydrationTestcallsPropertyHydrationTestcallsChoiceCaseTestcallsChoiceDefinitionExceptionTestcallsChoiceLiteralTestcallsChoiceSyntaxTestcallsChoiceValidationTestcallsPlanContentsTestcallsColumnRefTestcallsFixturePlanTestcallsPlanStatementsTestcallsRelationCursorTestcallsRelationReaderTestcallsPlanParserTestcallsPlanStructureExceptionTestcallsPlanSyntaxExceptionTestcallsPlanTablesTestcallsRelationGroupsTestcallsStatementPrinterTestcallsRelationChoiceTestcallsRelationTestcallsPlanValidationTestcallsTableNameTestcallsFixtureProviderTestcallsSqlSchemaProviderTestcalls
Relations§
Instantiated in 3
- new SqlFixture\Plan\Choice\ChoiceSyntax::print() packages/sql-fixture/src/Plan/Choice/ChoiceSyntax.php:93
- new SqlFixture\Plan\FixturePlan::toString() packages/sql-fixture/src/Plan/FixturePlan.php:267
- new SqlFixture\Plan\Validation\PlanValidation::rejectUnboundedSelfReferences() packages/sql-fixture/src/Plan/Validation/PlanValidation.php:54
Method calls 3
- method-call SqlFixture\Plan\Choice\ChoiceSyntax::print() packages/sql-fixture/src/Plan/Choice/ChoiceSyntax.php:93
- method-call SqlFixture\Plan\FixturePlan::toString() packages/sql-fixture/src/Plan/FixturePlan.php:267
- method-call SqlFixture\Plan\Validation\PlanValidation::rejectUnboundedSelfReferences() packages/sql-fixture/src/Plan/Validation/PlanValidation.php:54