News Feed
Jobs Feed
Sections




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

NetTuts.com:
BDD With Behat
December 24, 2013 @ 09:14:33

On NetTuts.com they've posted an introductory level tutorial for those that are exploring the world of testing and want to get their feet wet using some other tools. In this new post they introduce Behat, a human-readable functional testing tool written in PHP (but not just for PHP applications).

The BDD PHP framework Behat, allows you to test your PHP applications using human-readable sentences to write features and scenarios about how your applications should behave in order to test out its functionality. We can then run these tests to see if our application is behaving as expected. Let's spend about 15 minutes quickly going over Behat's installation process and learn how we can test our PHP applications behavior using the basics.

They help you get the tool installed (via Composer) and show you how to create your first feature file. They use a simple "adder" class for their examples that has two methods - add and display. The article covers features, scenarios and steps - including the code you'll need to add to the context file for any custom steps. Finally, they show how to run the tests and a sample of what the output looks like when everything's successful.

0 comments voice your opinion now!
bdd behat tutorial introduction beginner

Link: http://net.tutsplus.com/tutorials/php/bdd-with-behat

blog comments powered by Disqus

Similar Posts

Lorna Mitchell's Blog: Fetching Namespaced XML Elements With SimpleXML

Zend Developer Zone: Working with RAR, LZF and BZ2 Compression Formats in PHP

Phish Tank: Install & Configure Apache+PHP+ZendFramework+OracleDbXe On Windows In Minutes

Wokay.com: 12+ Tutorials for creating PHP5 MVC Framework

Ian Selby's Blog: Create a REST API with PHP


Community Events











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


symfony2 series opinion language application install unittest component composer security hhvm dependency overview framework facebook podcast hack package introduction release

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