Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Strategies to test an application using Laravel-MongoDB #23

Closed
thylo opened this issue Aug 21, 2013 · 1 comment
Closed

Strategies to test an application using Laravel-MongoDB #23

thylo opened this issue Aug 21, 2013 · 1 comment

Comments

@thylo
Copy link

thylo commented Aug 21, 2013

Hi,

Thanks for your module, it look very promising.
I'm pretty new to the testing world so I was just wondering how you would do integration tests on an application using your module.

Laravel tools like migration and seeding are not quite relevant with MongoDB.

What I would do is to set up a test db, flush it before each test, and then use something like https://github.com/Zizaco/factory-muff to populate my test db with some fake models.

What is your strategy on that matter ?

@jenssegers
Copy link
Contributor

I'm definitely not an expert in unit testing, there is still a lot I can learn myself.

Writings tests for an application using this database driver should not be different from tests using the original drivers.

The original Laravel tests use Mockery, so be sure to check that out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants