HasInDatabase
class HasInDatabase extends PHPUnit_Framework_Constraint
Properties
protected int | $show | Number of records that will be shown in the console in case of failure. |
|
protected Connection | $database | The database connection. |
|
protected array | $data | The data that will be used to narrow the search in the database table. |
Methods
void
bool
matches(string $table)
Check if the data is found in the given table.
string
failureDescription(string $table)
Get the description of the failure.
string
getAdditionalInfo(string $table)
Get additional info about the records found in the database table.
string
toString(int $options = 0)
Get a string representation of the object.
Details
at line 38
void
__construct(Connection $database, array $data)
Create a new constraint instance.
at line 51
bool
matches(string $table)
Check if the data is found in the given table.
at line 62
string
failureDescription(string $table)
Get the description of the failure.
at line 76
protected string
getAdditionalInfo(string $table)
Get additional info about the records found in the database table.
at line 99
string
toString(int $options = 0)
Get a string representation of the object.