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

Idea: Running own queries #592

agarzon opened this issue Oct 4, 2013 · 1 comment


None yet
2 participants
Copy link

commented Oct 4, 2013

I just wondering... there's any chance to run custom SQL or abstractions but using the same Db instanced ?

I would like to perform my own cleanup, but no using dumping files. We use separated databases for production and test (some Gigabytes size) and clean-restoring the dump is not efficient for this.

I think, at same way we have $I->haveInDatabase() would be great something like $I->executeInDatabase() or similar. So, people can perform his own queries to clean up, inserting-editing before test, etc.

Is just an idea, I would like to hear opinions.


This comment has been minimized.

Copy link

commented Oct 6, 2013

Basically that's where helpers should be used.
Don't run SQL in your tests, as they make tests not readble.
Instead use helper class and connect it with Db module.
The Modules & Helpers chapter of Guides is just about that.

@DavertMik DavertMik closed this Oct 6, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.