Closed dennis-koster closed 3 years ago
This is not inconsistent. Most assertion methods are static
and therefore called as such (assertSame
for example). The assertDatabaseHas
method however is not static
and therefore not called as such.
trait InteractsWithDatabase
{
protected function assertDatabaseHas($table, array $data, $connection = null)
}
The use of static vs non-static assertions in the test cases is inconsistent. For instance: https://github.com/daniel-de-wit/lighthouse-sanctum/blob/master/tests/Integration/GraphQL/Mutations/RegisterTest.php#L45
For code consistency it would be better to pick either
$this->assert
orstatic::assert
.