0

I noticed Codeception has the option of sqlite:memory. Should I opt out of Mockery when this is the case?

What I understand is Mockery enables a test to avoid hitting the database. With the mentioned option of Codeception I am able to seed the database with sample data and hit it in the memory.

When I put this together with Selenium2 and PhantomJS, some tests were going from 15 seconds to 1 second in Laravel 4.

user2094178
  • 9,204
  • 10
  • 41
  • 70

1 Answers1

0

Wouldn't that be two different things?.

I haven't used Mockery, I used phpunit mocks a long time ago, but I don't see how can you opt out of Mockery with sqlite.

Wouldn't you want to use the mocks to have some particular behavior when something happens, which is a bit different o have the database setup very quickly ?.

Also, keep in mind that if you have Postgres or Mysql and you go to use sqlite, some things won't be exactly the same.

I do agree that sometimes you need to speed up things with sqlite (I did the same in Python for some suites that I had and were taking a lot of time).

My two cents.