Hi phpspec users,
first, I'm very new in BDD generally. It's hard to find good articles about working with PHPSpec,
especially in the context with Symfony2 + Doctrine2 projects.
So therefore, I ask you to share your experiences with BDD + PHPSpec here.
I hope, we come up with useful information so that I can write a documentation about the "best practise" with examples.
The questions:
1) Do you mix phpspec and phpunit in a project? Why? If not, why not?
Do you replace functional tests with behat (despite behat != functional test)
and phpunit with phpspec?
2) How do you spec an entity? Do you ignore the annotation configuration
in your spec? How do you ensure that this configuration is working?
What about ex. Doctrine2 extensions like Timestampable, Sluggable which
you configure your entity with to get slug behavior and do you spec this behavior? And how?
Do you spec every setter and getter methods? Or just only some methods?
3) Do you spec your controllers and views? Why do you not write functional tests?
Do you think, this is bad practise and we should write functional tests? And why?
4) Do you spec your forms and validators? What do you spec?
Or just functional tests?
I'm looking forward to discuss with you here.
Thank you!
Fabian