I am in love with Cucumber. It's easily configured for a Ruby on Rails application. However, I'm new to Ruby and so is the rest of my team. We are writing PHP applications using the Zend Framework. I'm interested in hearing how you have implemented BDD for your PHP applications and what frameworks/libraries I should use. Have you configured Cucumber? Or are you using a different library?
Asked
Active
Viewed 1,763 times
3
-
possible duplicate of http://stackoverflow.com/questions/530712/whats-the-state-of-tdd-and-or-bdd-in-php – Brandon Frohbieter Oct 25 '10 at 17:07
-
would be a duplicate, but most (if not all) of the answers refer to TDD and not BDD – Andrew Oct 25 '10 at 17:20
-
1that's because the answer that mentions BDD is underdeveloped in the PHP world still holds true as of this writing. [PHPUnit had a BDD layer but Sebastian removed it](http://github.com/sebastianbergmann/phpunit/issues/issue/29?authenticity_token=c398b262c94ae8ceccc857a1225453ee7e62262f) because he doesnt believe in BDD and my impression from PHPUCHH and IPC10 was a lot of people in the PHP world think alike. Have a look at http://stackoverflow.com/questions/1389601/cucumber-for-php-application to see how to use Cucumber for PHP. – Gordon Oct 25 '10 at 17:27
2 Answers
5
Cuke4PHP
Cuke4PHP implements the Cucumber wire protocol, making it possible to write step definitions in PHP. This means you can write some (or most) of your step definitions in Ruby and write the other step definitions in PHP (the ones that have to do with modifying the database).
Another alternative is..
Behat
Behat is a port of Cucumber written in PHP 5.3. Unfortunately, it requires PHP 5.3, so if your environment is not set up for PHP 5.3, you won't be able to use this.
0
I've successfully ran cucumber with PHP step definitions using cuke4php. But the Windows users on our dev team could not run cuke4php because they ran into a problem with ruby and fork(2) on that platform.