-
Notifications
You must be signed in to change notification settings - Fork 11.7k
Closed
Description
At the moment it doesn't seem possible to check whether a value != something.
If you change the $data parameter, on this line, to allow for either an array or callable value it becomes possible to provide a more complex query.
Proposed change
/**
* Assert that a given where condition exists in the database.
*
* @param string $table
* @param array|callable $data
* @param string $connection
* @return $this
*/
protected function seeInDatabase($table, $data, $connection = null)
{
// ...
}This will also need to be reflected on lines 239 and 252.
Example use case
$this->seeInDatabase('vehicles', function($query) use ($vehicle)
{
$query->where('id', $vehicle->id)
->whereNotNull('discontinued_at');
});Would this be beneficial to anybody, are there any circumstance where it could break?
Metadata
Metadata
Assignees
Labels
No labels