final class TableOverrides<TValue>

Column values to use instead of generated ones, for one table.

Generated table classes build these through named arguments, so the column names and their types are checked where they are written rather than when the fixture runs. A null argument means "leave this column to the

  • generator"; withNull() is how a column is deliberately set to NULL.

Methods§

public function __construct(
    private array<string, TValue> $values,
    private array<array-key, string> $nulls,
)

Parameters

$valuesarray<string, TValue>
$nullsarray<array-key, string>Columns to set to NULL rather than generate
public function withNull(string ...$columns): self<TValue>

Set a column to NULL rather than leaving it to the generator.

Parameters

$columnsstring

Returns

self<TValue>
Calls 1
public function toArray(): array<string, TValue|null>

Returns

array<string, TValue|null>

Private surface 2§

Implementation details, listed for orientation only.

private array<string, TValue> $values
private array<array-key, string> $nulls

Test cases 23§

Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.

Dedicated tests 9
Other tests reaching this symbol 14

Relations§

Type checks 2
Type declarations 1