Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Devis Lucato's Blog:
PHP BDD with Cucumber/Cuke4Php
Apr 06, 2011 @ 17:52:03

Devis Lucato has put together a new post to his blog showing how to use the Cuke4PHP tool to use Cucumber-style BDD (behavior-driven development) testing in your development.

Cucumber is a Behavioural Driven Development framework written in Ruby. Using a wire it allows to write BDD steps in PHP to test PHP applications. Cuke4php is in fact a wire protocol implementation of Cucumber written in PHP.

You'll still need to have Cucumber (Ruby) installed on your testing system, but pulling in the Cuke4PHP tool is as easy as pointing your "pear" command-line tool at their PEAR server and installing. With a little bit of configuration (and possibly an install of PHPUnit) you'll be up and running. You can then write Cucumber tests that can run against your PHP code. They've included a sample PHP class and a Cucumber test to match it.

tagged: behaviordriven development cucumber testing cuke4php

Link:

Greepit.com:
Behavior Driven Development Framework for PHP: Behat
Feb 03, 2011 @ 16:56:27

On Greepit.com there's a quick post pointing out a behavior-driven development framework for PHP that turns the usual sort of testing (unit testing) around and looks from the other side - Behat.

Unlike any other PHP testing framework that tests applications inside out. Behat is testing applications outside in. It means, that Behat works only with your application’s input/output. There are Symfony plugin and Symfony2 bundle for Behat, so you can start testing your applications right now.

Behat is an open source behavior-driven development framework that's PHP 5.3 only inspired by Ruby's Cucumber project. You can install it in one of two ways - either from their custom PEAR channel (pear.everzet.com) or by cloning their github repository. The Behat site has some example tests to get you started.

tagged: behat behaviordriven development cucumber testing

Link:


Trending Topics: