danhanly's avatar

Using sqlite with Laravel & Behat

I follow Jeffery's instruction to the letter on the "Laravel 5 and Behat: Driving Authentication" video, but for some reason, I get this error when running my code:

 ┌─ @BeforeScenario # FeatureContext::migrate()
  │
  ╳  Database [acceptance.sqlite] not configured. (InvalidArgumentException)
  │
  ┌─ @BeforeScenario # FeatureContext::beginTransaction()
  │
  ╳  Database [acceptance.sqlite] not configured. (InvalidArgumentException)
  │

I was sure I missed a step, but I watched parts of the video over and over to ensure I hadn't. Can anybody help?

0 likes
2 replies
bobbybouwmann's avatar

Are you sure you created a file called acceptance.sqlite? Around 6:30 in the video ;)

AndyWendt's avatar

To add this file during the test process, you can use behat hooks. So in FeatureContext::prepare() you could create the acceptance.sqlite file and in the FeatureContext::cleanDB() you could delete the file.

Please or to participate in this conversation.