class CountInDatabase extends Constraint

Properties

protected int|null $expectedCount

The expected table entries count that will be checked against the actual count.

protected int|null $actualCount

The actual table entries count that will be checked against the expected count.

Methods

__construct(Connection $database, int $expectedCount)

Create a new constraint instance.

bool
matches(string $table)

Check if the expected and actual count are equal.

string
failureDescription(string $table)

Get the description of the failure.

string
toString(int $options = 0)

Get a string representation of the object.

Details

at line 26
__construct(Connection $database, int $expectedCount)

Create a new constraint instance.

Parameters

Connection $database
int $expectedCount

at line 38
bool matches(string $table)

Check if the expected and actual count are equal.

Parameters

string $table

Return Value

bool

at line 50
string failureDescription(string $table)

Get the description of the failure.

Parameters

string $table

Return Value

string

at line 65
string toString(int $options = 0)

Get a string representation of the object.

Parameters

int $options

Return Value

string