class
Illuminate
/
Testing
/
Constraints
/
HasInDatabase
You're browsing the documentation for an upcoming version of Laravel. The documentation and features of this release are subject to change.
HasInDatabase
Extends
-
PHPUnit\...\Constraint
Properties
protected
$show int
Number of records that will be shown in the console in case of failure.
Default: 3
protected
$data array
The data that will be used to narrow the search in the database table.
Default: null
Methods
public
__construct ( Connection $database , array $data ) : void
Create a new constraint instance.
Parameters
- $database Connection
- $data array
public
matches ( $table ) : bool
Check if the data is found in the given table.
Parameters
- $table string
public
failureDescription ( $table ) : string
Get the description of the failure.
Parameters
- $table string
protected
getAdditionalInfo ( $table ) : string
Get additional info about the records found in the database table.
Parameters
- $table string
public
toString ( $options ) : string
Get a string representation of the object.
Parameters
- $options int