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:
PHPUnit vs. Phake cheatsheet
April 19, 2013 @ 09:53:45

On DZone.com today Giorgio Sironi has posted a "cheat sheet" to help you correlate the functionality of two PHP unit testing tools - PHPUnit vs Phake (for mocking objects).

Benjamin Eberlei introduced me to Phake with his recent article: it is a Composer-ready PHP library that integrates easily with PHPUnit and provides an independent Test Doubles framework, capable of producing Stubs, Mocks, and Spies. The syntax and object model reminds me of Mockito, the Java Test Double framework from the authors of Growing Object-Oriented Software. I like tools that do one thing and do it well, and after experimenting with Phake I'm using it on all new code.

He compares the two tools on a few different pieces of functionality including creating stubs, mocks and spies. Sample code is included for both sides. It's not a detailed guide by any means, but it can give you a better picture of how the two compare.

0 comments voice your opinion now!
phpunit phake mock stub unittest spies compare cheetsheet

Link: http://css.dzone.com/articles/phpunit-vs-phake-cheatsheet

blog comments powered by Disqus

Similar Posts

Tobias Schlitt\'s Blog: eZ Components and PEAR

Benjamin Eberlei's Blog: Testing Database Locks with PHPUnit and Gearman

Mark Brady's Blog: Closures in PHP 5.3

Fabien Potencier's Blog: Create your own framework... on top of the Symfony2 Components (part 8)

NetTuts.com: Hands-On Unit Testing With PHPUnit (Screencast)


Community Events





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


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

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