final class RowSpec<TValue>

What the caller asked for, for one table.

The second argument of fixture() only overrides what would otherwise be generated, so a table may be described four ways:

3 three rows, every column generated ['status' => 'paid'] every row has that status, count still free [[...], [...]] one entry per row [] no rows at all

An absent table is not described at all, and everything about it, count included, is generated.

Properties§

public ?int $count

Methods§

public function __construct(
    public ?int $count,
    private list<array<TValue>>|null $rows,
    private array<TValue> $sharedOverrides,
)

Parameters

$count?int
$rowslist<array<TValue>>|nullOverrides per row, or null when the count is free
$sharedOverridesarray<TValue>
public static function unspecified(): self
public static function from(string $table, int|array<mixed>|TableOverrides $spec): self

Parameters

$tablestring
$specint|array<mixed>|TableOverrides

Returns

self

Throws

InvalidArgumentException If the shape is not one of the four
Test cases 17
Called from 1
Calls 7
public function overridesFor(int $index): array<mixed>

Overrides for one row of the given index.

Parameters

$indexint

Returns

array<mixed>
Called from 1

Private surface 2§

Implementation details, listed for orientation only.

private list<array<TValue>>|null $rows
private array<TValue> $sharedOverrides

Test cases 26§

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

Dedicated tests 10
Other tests reaching this symbol 16

Relations§

Static calls 2
Method calls 1
Type declarations 3