News Feed
Sections




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

Ibuildings techPortal:
Behavior Driven Development in PHP With Behat
July 27, 2011 @ 10:48:20

On the Ibuildings techPortal today there's a new post from Marcello Duarte looking at a different sort of software development methodology - behavior driven development - and using Behat in a sample project.

Because of the emphasis on test, developers tend to focus on class structure as opposed to how the system should behave. Ironically the focus on test moves developers away from TDD as it was intended. Quite often, because of the tendency to try to test everything, our tests end up tightly coupled with our implementation. If we change our code, we break our tests, even if the behaviour remains unchanged.

He talks about the option to use the agiledox method in PHPUnit tests and how it can help with test output readability. He takes it a step further with a look at Gherkin, the language for the Cucumber testing tool in Ruby. The next obvious step in the process comes with Behat, a sort of PHP version of the Cucumber testing tool. He includes a sample project and shows how to update it with sample steps and create a few basic tests to check video rental information.

0 comments voice your opinion now!
behaviordriven development behat testing tutorial


blog comments powered by Disqus

Similar Posts

Danne Lundqvist's Blog: Setting up a development environment with apache-2.2.6

Felix Geisendorfer's Blog: Setting up Xdebug on Mac OS X (or Win32 / Linux)

Jim Plush's Blog: PHP Socket Tutorial Part 1

HowToForge.com: Installing Cherokee With PHP5 And MySQL Support On Ubuntu 11.04

Freek Lijten's Blog: SOLID - The S is for Single responsibility


Community Events





Don't see your event here?
Let us know!


introduction podcast api bugfix release zendserver framework conference threedevsandamaybe interview deployment community series code list symfony development tips laravel language

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework