A repository test against a mocked connection asserts that the code calls the methods you expected, which is a restatement of the code rather than a check on it.
public function testEmailUniquenessIsCaseInsensitive(): void
{
$this->repo->save(new Customer('[email protected]'));
$this->expectException(DuplicateEmail::class);
$this->repo->save(new Customer('[email protected]'));
}
// that passes or fails because of the COLLATION.
// no mock will ever tell you about it.
Collation, unique constraints, foreign key actions, decimal rounding and maximum index key length are all properties of the database. Running against SQLite instead defeats the purpose entirely — different collation, different type affinity, no strict mode, foreign keys off unless asked. If the point is to test what the database does, it has to be the database, and a service container in CI makes that cheap.