[Testing] Can Codeception leverage multiple databases? General Advice Needed.
In my app, there's a need to have several databases. Taking first steps with codeception yesterday seemed to work, but it doesn't seem like it's compatible with using multiple databases?
As a testing noob, I was trying to start with some acceptance (or functional) tests since they seem the most readable. I liked the syntax and style of codeception for this... but now I'm wondering what to use for unit tests? Does anyone successfully test their whole app with codeception, including unit tests? Or, am I better off using the phpspec + behat combo? Thanks in advance for any advice from experienced testers.
EDIT: Thought of another question. What's the best database setup for efficient testing... a separate database devoted to testing? Sqlite?
2 comments · 100% upvoted · other discussions
This is how I do it (previously answered on SO): http://stackoverflow.com/a/24216119/1317935
troutside [OP] 1 points · Jul 2014
Thanks for the answer! Could you please explain why / how that if statement detects that codeception is running? I suppose it's just because it runs on localhost and typical browser access is via port 8000 or similar. I think detecting the environment and making one specifically for acceptance will fix my current issue with WebDriver + PhantomJS not using my 'codeception' database. Are you finding codeception to be sufficient for your testing needs?