SeeInDatabase
extends Constraint
in package
Table of Contents
Properties
- $data : array<string|int, mixed>
- Data used to compare results against.
- $db : ConnectionInterface
- $show : int
- The number of results that will show in the database in case of failure.
Methods
- __construct() : mixed
- SeeInDatabase constructor.
- toString() : string
- Gets a string representation of the constraint
- failureDescription() : string
- Get the description of the failure
- getAdditionalInfo() : string
- Gets additional records similar to $data.
- matches() : bool
- Check if data is found in the table
Properties
$data
Data used to compare results against.
protected
array<string|int, mixed>
$data
$db
protected
ConnectionInterface
$db
$show
The number of results that will show in the database in case of failure.
protected
int
$show
= 3
Methods
__construct()
SeeInDatabase constructor.
public
__construct(ConnectionInterface $db, array<string|int, mixed> $data) : mixed
Parameters
- $db : ConnectionInterface
- $data : array<string|int, mixed>
toString()
Gets a string representation of the constraint
public
toString([bool $exportObjects = false ][, int $options = 0 ]) : string
Parameters
- $exportObjects : bool = false
- $options : int = 0
Return values
stringfailureDescription()
Get the description of the failure
protected
failureDescription(mixed $table) : string
Parameters
- $table : mixed
Return values
stringgetAdditionalInfo()
Gets additional records similar to $data.
protected
getAdditionalInfo(string $table) : string
Parameters
- $table : string
Return values
stringmatches()
Check if data is found in the table
protected
matches(mixed $table) : bool
Parameters
- $table : mixed