class
Illuminate
/
Testing
/
Constraints
/
CountInDatabase
CountInDatabase
Extends
-
PHPUnit\...\Constraint
Properties
protected
$expectedCount int
The expected table entries count that will be checked against the actual count.
Default: null
protected
$actualCount int
The actual table entries count that will be checked against the expected count.
Default: null
Methods
public
__construct ( Connection $database , int $expectedCount ) : void
Create a new constraint instance.
Parameters
- $database Connection
- $expectedCount int
public
matches ( $table ) : bool
Check if the expected and actual count are equal.
Parameters
- $table string
public
failureDescription ( $table ) : string
Get the description of the failure.
Parameters
- $table string
public
toString ( $options ) : string
Get a string representation of the object.
Parameters
- $options int