classOverrideValidator
final class OverrideValidator
Rejects overrides that the declared table cannot store.
Methods§
public function assertOverridesFitSchema(TableSchema $schema, array<mixed> $overrides): voidRefuse an override the table could not hold.
Without this a misspelt column is dropped and the real one generated at random, and a null lands in a NOT NULL column to fail much later at the insert. Both look like working fixtures right up until they do not.
Parameters
$schema | TableSchema | |
$overrides | array<mixed> |
Called from 1
Calls 5
- function-call
is_stringline 30 - new UnknownOverrideColumnException line 31
- method-call TableSchema::getColumn() line 33
- new GeneratedColumnOverrideException line 40
- new NullOverrideException line 44
Test cases 13§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 1
Other tests reaching this symbol 12
PostgreSqlEndToEndTestcallsSqliteIntegrationTestcallsDatabaseFixtureProviderTestcallsFileFixtureProviderTestcallsRowMaterializerTestcallsPlanGeneratorTestcallsRowGenerationTestcallsFixtureGeneratorTestcallsFixtureProviderTestcallsConstructorHydrationTestcallsPropertyHydrationTestcallsSqlSchemaProviderTestcalls