classRowGenerator
final class RowGenerator
implements RowGeneration
Generates schema-driven rows using injected value and hydration contracts.
Methods§
public function __construct(
private Generator $faker,
private TypeMapperInterface $typeMapper,
private HydratorInterface $hydrator,
)Supplies the behavior needed to realize a row without selecting a platform.
Parameters
$faker | Generator | |
$typeMapper | TypeMapperInterface | |
$hydrator | HydratorInterface |
public function generate<T of object>(
TableSchema $schema,
array<mixed> $overrides = [],
class-string<T>|null $className = null,
): ($className is null ? array<string, mixed> : T)Parameters
$schema | TableSchema | |
$overrides | array<mixed> | |
$className | class-string<T>|null |
Returns
($className is null ? array<string, mixed> : T)Test cases 2
Called from 1
Calls 5
- method-call OverrideValidator::assertOverridesFitSchema() line 38
- new OverrideValidator line 38
- function-call
array_key_existsline 45 - method-call TypeMapperInterface::generate() line 54
- method-call HydratorInterface::hydrate() line 61
Private surface 3§
Implementation details, listed for orientation only.
private Generator $fakerprivate TypeMapperInterface $typeMapperprivate HydratorInterface $hydratorTest cases 9§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 2
Other tests reaching this symbol 7
PostgreSqlEndToEndTestcallsSqliteIntegrationTestcallsPlanGeneratorTestcallsDatabaseFixtureProviderTestcallsFileFixtureProviderTestcallsFixtureGeneratorTestcallsFixtureProviderTestcalls