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()

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.

Laracasts Mascot

Hi, Have We Met Yet?

Did you know that, in addition to the forum, Laracasts includes well over 1000 lessons on modern web development? All for the price of one lunch out per month.

Sign Me Up


Reply to

Use Markdown with GitHub-flavored code blocks.