phpDocumentor Gallery
PHPUnit
[ class tree: Gallery ] [ index: Gallery ] [ all elements ]

Procedural File: MockObject.class

Source Location: /lib/tools/phpunit/MockObject.class

Page Details

Base class for mock objects (UnitTestStorage, UnitTestPlatform and UnitTestPhpVm) that provides an easy way to specify the replies for a call sequence.

To mock up an individual class, extend MockObject and then mimic the API that you want to mock. The body of each mimicked method should contain a call to MockObject::_makeReply, like this:

function describeMap($mapName, $tryAllModules=false) { return $this->_makeReply('describeMap', array($mapName, $tryAllModules)); }

Version:  $Revision: 17580 $
Author:  Bharat Mediratta <bharat@menalto.com>
Classes
Class Description
MockObject Base class for mock objects (UnitTestStorage, UnitTestPlatform and UnitTestPhpVm) that provides an easy way to specify the replies for a call sequence.

Documentation generated on Fri, 03 Oct 2008 05:42:16 -0700 by phpDocumentor 1.3.0RC6