class CountInDatabase extends Constraint (View source)
protected Connection | $database | The database connection. | |
protected int | $expectedCount | The expected table entries count that will be checked against the actual count. | |
protected int | $actualCount | The actual table entries count that will be checked against the expected count. |
void | __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. |
Create a new constraint instance.
Check if the expected and actual count are equal.
Get the description of the failure.
Get a string representation of the object.
© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/8.x/Illuminate/Testing/Constraints/CountInDatabase.html