开发者

Behavior Driven Development and PHP applications

开发者 https://www.devze.com 2023-01-22 09:40 出处:网络
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 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 开发者_Python百科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?


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.


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.

Running fork(2) from Windows with Cygwin. Possible?

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号