I am running laravel dusk tests.
I am trying to determine whether the database has a record which contains a string.
Eloquent has a wildcard where clause that performs this activity.
i.e. 'like', '%' . $stringToSearch . '%'
I am trying to find a syntax that performs the same comparison with assertDatabaseHas
in my dusk browser tests.
Standard where query...
$this->assertDatabaseHas('tableName',['TableField' => 'stringToFind']);
Query i would like to think exists...
$this->assertDatabaseHas('tableName',['TableField' => 'like', '%' . $stringToSearch . '%']);