SQL HY000 error when seeding phpunit tests

Posted 4 years ago by DarkRoast

Hi, I am trying to seed an sqlite in-memory database for use in phpunit tests. in tests/TestCase.php I have a prepareForTests() method with two artisan calls:

protected function prepareForTests()
{
    Artisan::call('migrate');
    Artisan::call('db:seed');
}

The call to db:seed seems to be causing this error:

PDOException: SQLSTATE[HY000]: General error: 1 near "SET": syntax error

Any ideas what might cause this?

Please sign in or create an account to participate in this conversation.

Reply to

Use Markdown with GitHub-flavored code blocks.