Fix code of phpunit for DB tests