News Feed
Sections




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

DZone.com:
PHPSpec BDD for your classes
June 03, 2011 @ 08:57:12

In a new post to the "PHP on Windows" section of DZone.com, Giorgio Sironi looks at another testing tool to add to your arsenal - PHPSpec, a behavior-driven development testing tool similar to Ruby's RSpec.

Behavior-Driven Development can be seen as an evolution of Test-Driven Development, stricly in its outside-in version and with a refined language. In the case of the tool I'm reviewing today, BDD is implemented with code instead of with textual feature files (e.g. written in Gherkin) like in Behat. PHPSpec is similar to (or a port of) RSpec, the original BDD Ruby tool. It fills the need for an approach different from the classical xUnit at the class level.

He points out the place he thinks PHPSpec has in the software testing world as it fits with things like Behat and PHPUnit. He also includes some sample code to show it at work - a sample test that checks against an object for things like "should be an object" or "should not return the same number for multiples of three" for the basic class FizzBuzz.

0 comments voice your opinion now!
phpspec behaviordriven development testing unittest class


blog comments powered by Disqus

Similar Posts

Ibuildings Blog: PHP Belgium meeting

DevShed: Working with Directory Iterators and Proxy Classes with PHP 5

Maarten Balliauw's Blog: Office 2007 SpreadsheetML classes in PHP

Erika Heidi: A beginners guide to Vagrant - getting your portable development environment, part 1

Shashikant Jagtap: Behat2.4 : Painless installation with Composer


Community Events

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


release laravel5 unittest interview language opinion php7 version framework voicesoftheelephpant podcast extension introduction list api library wordpress series laravel community

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