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

Sebastian Bergmann's Blog:
Fluent Interface in PHPUnit 3.0
January 20, 2006 @ 07:07:48

A little while back, the topic of "fluent interfaces" came up on several different blogs. Continuing that train of thought, Sebastian Bergmann has posted this new item over on his blog that highlights some of the "fluent interface" structures that PHPUnit 3.0 will allow.

One topic that has made a few appearances (#1, #2, #3) in PHP-related blogs lately is that of Fluent Interfaces. A good example of a fluent interface is the API of jMock.

PHPUnit 3.0 provides the same fluent interface for configuring its Mock Objects (because PHPUnit's implementation of Mock Objects is a port of jMock).

He shows a code exmaple of how to get it all working, showing how to create a chain of methods that leads to more readable, "fluent" code...

1 comment voice your opinion now!
fluent interface phpunit 3.0 jmock object fluent interface phpunit 3.0 jmock object


blog comments powered by Disqus

Similar Posts

rooJSolutions Blog: Watch-out PHP 5.3.7+ is about.. and the is_a() / __autoload() mess.

Matt Williams' Blog: High level search with PHP and Apache Solr

Ivo Jansch's Blog: Validating OCL constraints in PHP objects

PHPMaster.com: The Liskov Substitution Principle

Mike Naberezny's Blog: Better PHPUnit Group Annotations


Community Events











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


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

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