News Feed
Sections




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

NetTuts.com:
A BDD Workflow With Behat and Phpspec
July 04, 2014 @ 14:20:23

NetTuts.com has posted a new tutorial today showing a sample testing BDD workflow using the Behat and PHPSpec testing tools. The BDD (behavior-driven development) approach focuses on using test-driven development and domain-driven design rather than just a unit testing approach.

In this tutorial, we will have a look at two different BDD tools, Behat and phpspec, and see how they can support you in your development process. Learning BDD can be confusing. New methodology, new tools and many questions, such as "what to test?" and "which tools to use?". I hope that this rather simple example will give you ideas to how you can incorporate BDD into your own workflow.

The article isn't a "getting started with BDD" guide, so you'll need to know a bit about the ideas and process before getting into it. He starts with a look at the workflow Taylor Otwell (his inspiration for this) uses and how to install Behat and get to work on a first feature file. He describes the thought process behind the steps and some of the PHP code required to make them work. He then gets to the use of phpspec to mock out a needed "Config" dependency. He works though the rest of the tests and includes the output when all tests are passing.

0 comments voice your opinion now!
bdd workflow phpspec behat taylorotwell tutorial

Link: http://code.tutsplus.com/tutorials/a-bdd-workflow-with-behat-and-phpspec--cms-21601

blog comments powered by Disqus

Similar Posts

DevShed: Caching Dynamic Twitter Signature Images with PHP

Michael Feichtinger's Blog: PHP5 WebSocket Example - A Simple Chat

David Müller's Blog: Parallel processing in PHP

SitePoint PHP Blog: Selling Downloads with Stripe and Laravel

SitePoint PHP Blog: Essentials of LDAP with PHP


Community Events





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


package series opinion version language laravel framework voicesoftheelephpant composer interview podcast release community tool security introduction update symfony install library

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