ardent
ardent copied to clipboard
Automated Test Suite
I've started working on an automated test suite for Ardent using PHPUnit and Mockery (same as used in Laravel).
Since LaravelBook\Ardent\Ardent is a large class, I've decided to split the tests out into separate 'feature oriented' test classes. Currently, I've written most of the 'Validation' feature's tests, and have staged test classes for auto-hydration and model hooks.
I wanted to present this before I got much further in writing the tests to ensure that it's in line with the project's style and architecture (there don't seem to be any contribution guidelines). Please do not merge this yet, but please do comment on the changes, and try running the tests yourselves.
See: #55
Short reply: awesome! Long reply: Man, thanks for that. Sorry for taking forever to reply. My personal life have became a madness in the last few months.
Here's what I have to add about your changes:
- Stability went from dev to stable? I guess that makes sense in the end when we get tests, right? (:
- Am I able to put that on Travis? I've never used it. Maybe you could help me on that later?
- Actually, I think there's something on code style on the repository. If there's not, I do remember discussing this with @laravelbook when I first started contributing. The rule of thumb is: PSR-1 minus braces-in-the-next-line. It would be clearer to use the
{in the same line of the if/for/while/do/function/class. You can take a look at the current Ardent class to see how it's written, I think in one of my biggest commits I've organized the entire code given the decided rules, so I'm pretty sure it's following whatever guidelines we've decided on. - That said, tests are almost a "project inside the project". If you really feel you should follow other guidelines because of, say, PHPUnit examples or whatnot, feel free. I'm not sure if that would turn the project into a mess, though.