I am developing my first project using test driven development. I am using Zend Framework and PHPUnit.
Currently my project is at 100% code coverage but I am not sure I understand in what order I am supposed to write my code.
Am I supposed to write my test FIRST with what my objects are expected to do, or write my objects and then test them?
I've been working on completing a controller/model and then writing a test for it but I am not sure if this is what TDD is about.
Any advice?
For example, I wrote my Auth plugin and my Auth controller and tested that they work properly in my browser; then I sat down to write the tests for them which proved that there were some logical errors in the code that did work in the browser.