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

PHPro.org: SPL AppendIterator

Tutorial: An Introduction to XDebug

Rob Allen: Globally overriding validation messages for ZF2 forms

Stefan Mischook's Blog: Cannot load mysql extension error - Video Tutorial How To

Tom Van Herreweghe's Blog: Running Zend Framework modules from a Phar file


Community Events





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


application introduction code api podcast community bugfix language interview threedevsandamaybe library wordpress list developer configure unittest series install laravel release

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