cvs: pear /PHPUnit2_MockObjects package.xml /PHPUnit2_MockObjects/MockObjects Mock.php /PHPUnit2_MockObjects/MockObjects/Builder IdentityMapper.php
/PHPUnit2_MockObjects/MockObjects/Core DynamicMock.php Invokable.php Stub.php
| From: | Sebastian Bergmann | Date: | Fri, 16 Apr 2004 17:40:06 +0000 |
| Subject: | cvs: pear /PHPUnit2_MockObjects package.xml /PHPUnit2_MockObjects/MockObjects Mock.php /PHPUnit2_MockObjects/MockObjects/Builder IdentityMapper.php /PHPUnit2_MockObjects/MockObjects/Core DynamicMock.php Invokable.php Stub.php |
||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-18324@lists.php.net to get a copy of this message | ||
sebastian Fri Apr 16 13:40:06 2004 EDT
Added files:
/pear/PHPUnit2_MockObjects/MockObjects/Builder IdentityMapper.php
/pear/PHPUnit2_MockObjects/MockObjects/Core DynamicMock.php
Invokable.php Stub.php
Modified files:
/pear/PHPUnit2_MockObjects package.xml
/pear/PHPUnit2_MockObjects/MockObjects Mock.php
Log:
Flush.
http://cvs.php.net/diff.php/pear/PHPUnit2_MockObjects/package.xml?r1=1.3&r2=1.4&ty=u Index: pear/PHPUnit2_MockObjects/package.xml diff -u pear/PHPUnit2_MockObjects/package.xml:1.3 pear/PHPUnit2_MockObjects/package.xml:1.4 --- pear/PHPUnit2_MockObjects/package.xml:1.3 Fri Apr 16 05:59:51 2004 +++ pear/PHPUnit2_MockObjects/package.xml Fri Apr 16 13:40:05 2004 @@ -29,9 +29,16 @@ <filelist> <dir name="/" baseinstalldir="PHPUnit2"> <dir name="MockObjects"> + <dir name="Builder"> + <file role="php">IdentityMapper.php</file> + </dir> + <dir name="Core"> <file role="php">Constraint.php</file> + <file role="php">DynamicMock.php</file> + <file role="php">Invokable.php</file> <file role="php">SelfDescribing.php</file> + <file role="php">Stub.php</file> <file role="php">SupportTestCase.php</file> <file role="php">Verifiable.php</file> <file role="php">VerifyingTestCase.php</file> http://cvs.php.net/diff.php/pear/PHPUnit2_MockObjects/MockObjects/Mock.php?r1=1.1&r2=1.2&ty=u Index: pear/PHPUnit2_MockObjects/MockObjects/Mock.php diff -u pear/PHPUnit2_MockObjects/MockObjects/Mock.php:1.1 pear/PHPUnit2_MockObjects/MockObjects/Mock.php:1.2 --- pear/PHPUnit2_MockObjects/MockObjects/Mock.php:1.1 Fri Apr 16 05:04:11 2004 +++ pear/PHPUnit2_MockObjects/MockObjects/Mock.php Fri Apr 16 13:40:06 2004 @@ -12,9 +12,13 @@ // | license@php.net so we can mail you a copy immediately. | // +------------------------------------------------------------------------+ // -// $Id: Mock.php,v 1.1 2004/04/16 09:04:11 sebastian Exp $ +// $Id: Mock.php,v 1.2 2004/04/16 17:40:06 sebastian Exp $ // +require_once 'PHPUnit2/MockObjects/Builder/IdentityBuilder.php'; +require_once 'PHPUnit2/MockObjects/Builder/IdentityMapper.php'; +require_once 'PHPUnit2/MockObjects/Core/Invokable.php'; +require_once 'PHPUnit2/MockObjects/Core/DynamicMock.php'; require_once 'PHPUnit2/MockObjects/Core/Verifiable.php'; /** @@ -25,7 +29,223 @@ * @package PHPUnit2 * @subpackage MockObjects */ -class PHPUnit2_MockObjects_Mock implements PHPUnit2_MockObjects_Core_Verifiable { +class PHPUnit2_MockObjects_Mock implements PHPUnit2_MockObjects_Builder_IdentityMapper, PHPUnit2_MockObjects_Core_DynamicMock, PHPUnit2_MockObjects_Core_Verifiable { + // {{{ Members + + /** + * @var PHPUnit2_MockObjects_Core_DynamicMock + * @access public + */ + public $coreMock; + + /** + * @var Array + * @access public + */ + public $idTable = array(); + + // }}} + // {{{ public function __construct($mock, $name = '') + + /** + * Constructor. + * + * @param mixed $mock + * @param String $name + * @access public + * @todo Implement passing of ReflectionClass to constructor. + * @todo Handle error case when neither class name/ReflectionClass nor PHPUnit2_MockObjects_Core_DynamicMock is passed to constructor. + */ + public function __construct($mock, $name = '') { + if (is_string($mock) && class_exists($mock)) { + $mock = new ReflectionClass($mock); + } + + if ($mock instanceof ReflectionClass) { + return; + } + + if ($mock instanceof PHPUnit2_MockObjects_Core_DynamicMock) { + $this->coreMock = $mock; + return; + } + + throw new Exception(''); + } + + // }}} + // {{{ public function __toString() + + /** + * + * + * @return String + * @access public + */ + public function __toString() { + return $this->coreMock->__toString(); + } + + // }}} + // {{{ public function lookupID($id) + + /** + * + * + * @param String $id + * @return PHPUnit2_MockObjects_Builder_MatchBuilder + * @access public + * @todo Implement lookupID($id) method. + */ + public function lookupID($id) { + } + + // }}} + // {{{ public function registerMethodName($id, PHPUnit2_MockObjects_Builder_MatchBuilder $invocation) + + /** + * + * + * @param String $id + * @param PHPUnit2_MockObjects_Builder_MatchBuilder $invocation + * @access public + * @todo Implement registerMethodName($id, PHPUnit2_MockObjects_Builder_MatchBuilder $invocation) method. + */ + public function registerMethodName($id, PHPUnit2_MockObjects_Builder_MatchBuilder $invocation) { + } + + // }}} + // {{{ public function registerUniqueID($id, PHPUnit2_MockObjects_Builder_MatchBuilder $invocation) + + /** + * + * + * @param String $id + * @param PHPUnit2_MockObjects_Builder_MatchBuilder $invocation + * @access public + * @todo Implement registerUniqueID($id, PHPUnit2_MockObjects_Builder_MatchBuilder $invocation) method. + */ + public function registerUniqueID($id, PHPUnit2_MockObjects_Builder_MatchBuilder $invocation) { + } + + // }}} + // {{{ public function addInvokable(PHPUnit2_MockObjects_Core_Invokable $invokable) + + /** + * + * + * @param PHPUnit2_MockObjects_Core_Invokable $invokable + * @access public + */ + public function addInvokable(PHPUnit2_MockObjects_Core_Invokable $invokable) { + $this->coreMock->addInvokable($invokable); + } + + // }}} + // {{{ public function getMockedType() + + /** + * + * + * @return ReflectionClass + * @access public + */ + public function getMockedType() { + return $this->coreMock->getMockedType(); + } + + // }}} + // {{{ public function proxy() + + /** + * + * + * @return Object + * @access public + */ + public function proxy() { + return $this->coreMock->proxy(); + } + + // }}} + // {{{ public function setDefaultStub(PHPUnit2_MockObjects_Core_Stub $stub) + + /** + * + * + * @access public + * @todo Implement setDefaultStub(PHPUnit2_MockObjects_Core_Stub $stub) method. + */ + public function setDefaultStub(PHPUnit2_MockObjects_Core_Stub $stub) { + } + + // }}} + // {{{ public function reset() + + /** + * + * + * @access public + * @todo Implement reset() method. + */ + public function reset() { + } + + // }}} + // {{{ public function verify() + + /** + * Throw an AssertionFailedException if any expectations + * have not been met. + * + * @access public + */ + public function verify() { + $this->coreMock->verify(); + } + + // }}} + // {{{ public function stubs() + + /** + * + * + * @return PHPUnit2_MockObjects_Builder_IdentityMapper + * @access public + * @todo Implement stubs() method. + */ + public function stubs() { + } + + // }}} + // {{{ public function expects() + + /** + * + * + * @return PHPUnit2_MockObjects_Builder_IdentityMapper + * @access public + * @todo Implement expects() method. + */ + public function expects() { + } + + // }}} + // {{{ private function storeID($id, PHPUnit2_MockObjects_Builder_IdentityBuilder $builder) + + /** + * + * + * @param String $id + * @param PHPUnit2_MockObjects_Builder_IdentityBuilder $builder + * @return + * @access private + * @todo Implement storeID($id, PHPUnit2_MockObjects_Builder_IdentityBuilder $builder) method. + */ + private function storeID($id, PHPUnit2_MockObjects_Builder_IdentityBuilder $builder) { + } + + // }}} } /* http://cvs.php.net/co.php/pear/PHPUnit2_MockObjects/MockObjects/Builder/IdentityMapper.php?r=1.1&p=1 Index: pear/PHPUnit2_MockObjects/MockObjects/Builder/IdentityMapper.php +++ pear/PHPUnit2_MockObjects/MockObjects/Builder/IdentityMapper.php <?php // // +------------------------------------------------------------------------+ // | PEAR :: PHPUnit2 :: MockObjects | // +------------------------------------------------------------------------+ // | Copyright (c) 2002-2004 Sebastian Bergmann <sb@sebastian-bergmann.de>. | // +------------------------------------------------------------------------+ // | This source file is subject to version 3.00 of the PHP License, | // | that is available at http://www.php.net/license/3_0.txt. | // | If you did not receive a copy of the PHP license and are unable to | // | obtain it through the world-wide-web, please send a note to | // | license@php.net so we can mail you a copy immediately. | // +------------------------------------------------------------------------+ // // $Id: IdentityMapper.php,v 1.1 2004/04/16 17:40:06 sebastian Exp $ // require_once 'PHPUnit2/MockObjects/Builder/MatchBuilder.php'; /** * @author Sebastian Bergmann <sb@sebastian-bergmann.de> * @copyright Copyright © 2002-2004 Sebastian Bergmann <sb@sebastian-bergmann.de> * @license http://www.php.net/license/3_0.txt The PHP License, Version 3.0 * @category PHP * @package PHPUnit2 * @subpackage MockObjects */ interface PHPUnit2_MockObjects_Builder_IdentityMapper { // {{{ public function lookupID($id) /** * * * @param String $id * @return PHPUnit2_MockObjects_Builder_MatchBuilder * @access public */ public function lookupID($id); // }}} // {{{ public function registerMethodName($id, PHPUnit2_MockObjects_Builder_MatchBuilder $invocation) /** * * * @param String $id * @param PHPUnit2_MockObjects_Builder_MatchBuilder $invocation * @access public */ public function registerMethodName($id, PHPUnit2_MockObjects_Builder_MatchBuilder $invocation); // }}} // {{{ public function registerUniqueID($id, PHPUnit2_MockObjects_Builder_MatchBuilder $invocation) /** * * * @param String $id * @param PHPUnit2_MockObjects_Builder_MatchBuilder $invocation * @access public */ public function registerUniqueID($id, PHPUnit2_MockObjects_Builder_MatchBuilder $invocation); // }}} } /* * vim600: et sw=2 ts=2 fdm=marker * vim<600: et sw=2 ts=2 */ ?> http://cvs.php.net/co.php/pear/PHPUnit2_MockObjects/MockObjects/Core/DynamicMock.php?r=1.1&p=1 Index: pear/PHPUnit2_MockObjects/MockObjects/Core/DynamicMock.php +++ pear/PHPUnit2_MockObjects/MockObjects/Core/DynamicMock.php <?php // // +------------------------------------------------------------------------+ // | PEAR :: PHPUnit2 :: MockObjects | // +------------------------------------------------------------------------+ // | Copyright (c) 2002-2004 Sebastian Bergmann <sb@sebastian-bergmann.de>. | // +------------------------------------------------------------------------+ // | This source file is subject to version 3.00 of the PHP License, | // | that is available at http://www.php.net/license/3_0.txt. | // | If you did not receive a copy of the PHP license and are unable to | // | obtain it through the world-wide-web, please send a note to | // | license@php.net so we can mail you a copy immediately. | // +------------------------------------------------------------------------+ // // $Id: DynamicMock.php,v 1.1 2004/04/16 17:40:06 sebastian Exp $ // require_once 'PHPUnit2/MockObjects/Core/Invokable.php'; require_once 'PHPUnit2/MockObjects/Core/Stub.php'; require_once 'PHPUnit2/MockObjects/Core/Verifiable.php'; /** * @author Sebastian Bergmann <sb@sebastian-bergmann.de> * @copyright Copyright © 2002-2004 Sebastian Bergmann <sb@sebastian-bergmann.de> * @license http://www.php.net/license/3_0.txt The PHP License, Version 3.0 * @category PHP * @package PHPUnit2 * @subpackage MockObjects */ interface PHPUnit2_MockObjects_Core_DynamicMock extends PHPUnit2_MockObjects_Core_Verifiable { // {{{ public function addInvokable(PHPUnit2_MockObjects_Core_Invokable $invokable) /** * * * @param PHPUnit2_MockObjects_Core_Invokable $invokable * @access public */ public function addInvokable(PHPUnit2_MockObjects_Core_Invokable $invokable); // }}} // {{{ public function getMockedType() /** * * * @return ReflectionClass * @access public */ public function getMockedType(); // }}} // {{{ public function proxy() /** * * * @return Object * @access public */ public function proxy(); // }}} // {{{ public function setDefaultStub(PHPUnit2_MockObjects_Core_Stub $stub) /** * * * @param PHPUnit2_MockObjects_Core_Stub $stub * @access public */ public function setDefaultStub(PHPUnit2_MockObjects_Core_Stub $stub); // }}} // {{{ public function reset() /** * * * @access public */ public function reset(); // }}} } /* * vim600: et sw=2 ts=2 fdm=marker * vim<600: et sw=2 ts=2 */ ?> http://cvs.php.net/co.php/pear/PHPUnit2_MockObjects/MockObjects/Core/Invokable.php?r=1.1&p=1 Index: pear/PHPUnit2_MockObjects/MockObjects/Core/Invokable.php +++ pear/PHPUnit2_MockObjects/MockObjects/Core/Invokable.php <?php // // +------------------------------------------------------------------------+ // | PEAR :: PHPUnit2 :: MockObjects | // +------------------------------------------------------------------------+ // | Copyright (c) 2002-2004 Sebastian Bergmann <sb@sebastian-bergmann.de>. | // +------------------------------------------------------------------------+ // | This source file is subject to version 3.00 of the PHP License, | // | that is available at http://www.php.net/license/3_0.txt. | // | If you did not receive a copy of the PHP license and are unable to | // | obtain it through the world-wide-web, please send a note to | // | license@php.net so we can mail you a copy immediately. | // +------------------------------------------------------------------------+ // // $Id: Invokable.php,v 1.1 2004/04/16 17:40:06 sebastian Exp $ // require_once 'PHPUnit2/MockObjects/Core/Invocation.php'; require_once 'PHPUnit2/MockObjects/Core/SelfDescribing.php'; require_once 'PHPUnit2/MockObjects/Core/Verifiable.php'; /** * @author Sebastian Bergmann <sb@sebastian-bergmann.de> * @copyright Copyright © 2002-2004 Sebastian Bergmann <sb@sebastian-bergmann.de> * @license http://www.php.net/license/3_0.txt The PHP License, Version 3.0 * @category PHP * @package PHPUnit2 * @subpackage MockObjects */ interface PHPUnit2_MockObjects_Core_Invokable extends PHPUnit2_MockObjects_Core_SelfDescribing, PHPUnit2_MockObjects_Core_Verifiable { // {{{ public function matches(PHPUnit2_MockObjects_Core_Invocation $invocation) /** * * * @param PHPUnit2_MockObjects_Core_Invocation $invocation * @return boolean * @access public */ public function matches(PHPUnit2_MockObjects_Core_Invocation $invocation); // }}} // {{{ public function invoke(PHPUnit2_MockObjects_Core_Invocation $invocation) /** * * * @param PHPUnit2_MockObjects_Core_Invocation $invocation * @return Object * @access public */ public function invoke(PHPUnit2_MockObjects_Core_Invocation $invocation); // }}} // {{{ public function hasDescription() /** * * * @return boolean * @access public */ public function hasDescription(); // }}} } /* * vim600: et sw=2 ts=2 fdm=marker * vim<600: et sw=2 ts=2 */ ?> http://cvs.php.net/co.php/pear/PHPUnit2_MockObjects/MockObjects/Core/Stub.php?r=1.1&p=1 Index: pear/PHPUnit2_MockObjects/MockObjects/Core/Stub.php +++ pear/PHPUnit2_MockObjects/MockObjects/Core/Stub.php <?php // // +------------------------------------------------------------------------+ // | PEAR :: PHPUnit2 :: MockObjects | // +------------------------------------------------------------------------+ // | Copyright (c) 2002-2004 Sebastian Bergmann <sb@sebastian-bergmann.de>. | // +------------------------------------------------------------------------+ // | This source file is subject to version 3.00 of the PHP License, | // | that is available at http://www.php.net/license/3_0.txt. | // | If you did not receive a copy of the PHP license and are unable to | // | obtain it through the world-wide-web, please send a note to | // | license@php.net so we can mail you a copy immediately. | // +------------------------------------------------------------------------+ // // $Id: Stub.php,v 1.1 2004/04/16 17:40:06 sebastian Exp $ // require_once 'PHPUnit2/MockObjects/Core/Invocation.php'; require_once 'PHPUnit2/MockObjects/Core/SelfDescribing.php'; /** * @author Sebastian Bergmann <sb@sebastian-bergmann.de> * @copyright Copyright © 2002-2004 Sebastian Bergmann <sb@sebastian-bergmann.de> * @license http://www.php.net/license/3_0.txt The PHP License, Version 3.0 * @category PHP * @package PHPUnit2 * @subpackage MockObjects */ interface PHPUnit2_MockObjects_Core_Stub extends PHPUnit2_MockObjects_Core_SelfDescribing { // {{{ public function invoke(PHPUnit2_MockObjects_Core_Invocation $invocation) /** * Processes the invocation. * * @return mixed * @access public */ public function invoke(PHPUnit2_MockObjects_Core_Invocation $invocation); // }}} } /* * vim600: et sw=2 ts=2 fdm=marker * vim<600: et sw=2 ts=2 */ ?>
http://cvs.php.net/diff.php/pear/PHPUnit2_MockObjects/package.xml?r1=1.3&r2=1.4&ty=u Index: pear/PHPUnit2_MockObjects/package.xml diff -u pear/PHPUnit2_MockObjects/package.xml:1.3 pear/PHPUnit2_MockObjects/package.xml:1.4 --- pear/PHPUnit2_MockObjects/package.xml:1.3 Fri Apr 16 05:59:51 2004 +++ pear/PHPUnit2_MockObjects/package.xml Fri Apr 16 13:40:05 2004 @@ -29,9 +29,16 @@ <filelist> <dir name="/" baseinstalldir="PHPUnit2"> <dir name="MockObjects"> + <dir name="Builder"> + <file role="php">IdentityMapper.php</file> + </dir> + <dir name="Core"> <file role="php">Constraint.php</file> + <file role="php">DynamicMock.php</file> + <file role="php">Invokable.php</file> <file role="php">SelfDescribing.php</file> + <file role="php">Stub.php</file> <file role="php">SupportTestCase.php</file> <file role="php">Verifiable.php</file> <file role="php">VerifyingTestCase.php</file> http://cvs.php.net/diff.php/pear/PHPUnit2_MockObjects/MockObjects/Mock.php?r1=1.1&r2=1.2&ty=u Index: pear/PHPUnit2_MockObjects/MockObjects/Mock.php diff -u pear/PHPUnit2_MockObjects/MockObjects/Mock.php:1.1 pear/PHPUnit2_MockObjects/MockObjects/Mock.php:1.2 --- pear/PHPUnit2_MockObjects/MockObjects/Mock.php:1.1 Fri Apr 16 05:04:11 2004 +++ pear/PHPUnit2_MockObjects/MockObjects/Mock.php Fri Apr 16 13:40:06 2004 @@ -12,9 +12,13 @@ // | license@php.net so we can mail you a copy immediately. | // +------------------------------------------------------------------------+ // -// $Id: Mock.php,v 1.1 2004/04/16 09:04:11 sebastian Exp $ +// $Id: Mock.php,v 1.2 2004/04/16 17:40:06 sebastian Exp $ // +require_once 'PHPUnit2/MockObjects/Builder/IdentityBuilder.php'; +require_once 'PHPUnit2/MockObjects/Builder/IdentityMapper.php'; +require_once 'PHPUnit2/MockObjects/Core/Invokable.php'; +require_once 'PHPUnit2/MockObjects/Core/DynamicMock.php'; require_once 'PHPUnit2/MockObjects/Core/Verifiable.php'; /** @@ -25,7 +29,223 @@ * @package PHPUnit2 * @subpackage MockObjects */ -class PHPUnit2_MockObjects_Mock implements PHPUnit2_MockObjects_Core_Verifiable { +class PHPUnit2_MockObjects_Mock implements PHPUnit2_MockObjects_Builder_IdentityMapper, PHPUnit2_MockObjects_Core_DynamicMock, PHPUnit2_MockObjects_Core_Verifiable { + // {{{ Members + + /** + * @var PHPUnit2_MockObjects_Core_DynamicMock + * @access public + */ + public $coreMock; + + /** + * @var Array + * @access public + */ + public $idTable = array(); + + // }}} + // {{{ public function __construct($mock, $name = '') + + /** + * Constructor. + * + * @param mixed $mock + * @param String $name + * @access public + * @todo Implement passing of ReflectionClass to constructor. + * @todo Handle error case when neither class name/ReflectionClass nor PHPUnit2_MockObjects_Core_DynamicMock is passed to constructor. + */ + public function __construct($mock, $name = '') { + if (is_string($mock) && class_exists($mock)) { + $mock = new ReflectionClass($mock); + } + + if ($mock instanceof ReflectionClass) { + return; + } + + if ($mock instanceof PHPUnit2_MockObjects_Core_DynamicMock) { + $this->coreMock = $mock; + return; + } + + throw new Exception(''); + } + + // }}} + // {{{ public function __toString() + + /** + * + * + * @return String + * @access public + */ + public function __toString() { + return $this->coreMock->__toString(); + } + + // }}} + // {{{ public function lookupID($id) + + /** + * + * + * @param String $id + * @return PHPUnit2_MockObjects_Builder_MatchBuilder + * @access public + * @todo Implement lookupID($id) method. + */ + public function lookupID($id) { + } + + // }}} + // {{{ public function registerMethodName($id, PHPUnit2_MockObjects_Builder_MatchBuilder $invocation) + + /** + * + * + * @param String $id + * @param PHPUnit2_MockObjects_Builder_MatchBuilder $invocation + * @access public + * @todo Implement registerMethodName($id, PHPUnit2_MockObjects_Builder_MatchBuilder $invocation) method. + */ + public function registerMethodName($id, PHPUnit2_MockObjects_Builder_MatchBuilder $invocation) { + } + + // }}} + // {{{ public function registerUniqueID($id, PHPUnit2_MockObjects_Builder_MatchBuilder $invocation) + + /** + * + * + * @param String $id + * @param PHPUnit2_MockObjects_Builder_MatchBuilder $invocation + * @access public + * @todo Implement registerUniqueID($id, PHPUnit2_MockObjects_Builder_MatchBuilder $invocation) method. + */ + public function registerUniqueID($id, PHPUnit2_MockObjects_Builder_MatchBuilder $invocation) { + } + + // }}} + // {{{ public function addInvokable(PHPUnit2_MockObjects_Core_Invokable $invokable) + + /** + * + * + * @param PHPUnit2_MockObjects_Core_Invokable $invokable + * @access public + */ + public function addInvokable(PHPUnit2_MockObjects_Core_Invokable $invokable) { + $this->coreMock->addInvokable($invokable); + } + + // }}} + // {{{ public function getMockedType() + + /** + * + * + * @return ReflectionClass + * @access public + */ + public function getMockedType() { + return $this->coreMock->getMockedType(); + } + + // }}} + // {{{ public function proxy() + + /** + * + * + * @return Object + * @access public + */ + public function proxy() { + return $this->coreMock->proxy(); + } + + // }}} + // {{{ public function setDefaultStub(PHPUnit2_MockObjects_Core_Stub $stub) + + /** + * + * + * @access public + * @todo Implement setDefaultStub(PHPUnit2_MockObjects_Core_Stub $stub) method. + */ + public function setDefaultStub(PHPUnit2_MockObjects_Core_Stub $stub) { + } + + // }}} + // {{{ public function reset() + + /** + * + * + * @access public + * @todo Implement reset() method. + */ + public function reset() { + } + + // }}} + // {{{ public function verify() + + /** + * Throw an AssertionFailedException if any expectations + * have not been met. + * + * @access public + */ + public function verify() { + $this->coreMock->verify(); + } + + // }}} + // {{{ public function stubs() + + /** + * + * + * @return PHPUnit2_MockObjects_Builder_IdentityMapper + * @access public + * @todo Implement stubs() method. + */ + public function stubs() { + } + + // }}} + // {{{ public function expects() + + /** + * + * + * @return PHPUnit2_MockObjects_Builder_IdentityMapper + * @access public + * @todo Implement expects() method. + */ + public function expects() { + } + + // }}} + // {{{ private function storeID($id, PHPUnit2_MockObjects_Builder_IdentityBuilder $builder) + + /** + * + * + * @param String $id + * @param PHPUnit2_MockObjects_Builder_IdentityBuilder $builder + * @return + * @access private + * @todo Implement storeID($id, PHPUnit2_MockObjects_Builder_IdentityBuilder $builder) method. + */ + private function storeID($id, PHPUnit2_MockObjects_Builder_IdentityBuilder $builder) { + } + + // }}} } /* http://cvs.php.net/co.php/pear/PHPUnit2_MockObjects/MockObjects/Builder/IdentityMapper.php?r=1.1&p=1 Index: pear/PHPUnit2_MockObjects/MockObjects/Builder/IdentityMapper.php +++ pear/PHPUnit2_MockObjects/MockObjects/Builder/IdentityMapper.php <?php // // +------------------------------------------------------------------------+ // | PEAR :: PHPUnit2 :: MockObjects | // +------------------------------------------------------------------------+ // | Copyright (c) 2002-2004 Sebastian Bergmann <sb@sebastian-bergmann.de>. | // +------------------------------------------------------------------------+ // | This source file is subject to version 3.00 of the PHP License, | // | that is available at http://www.php.net/license/3_0.txt. | // | If you did not receive a copy of the PHP license and are unable to | // | obtain it through the world-wide-web, please send a note to | // | license@php.net so we can mail you a copy immediately. | // +------------------------------------------------------------------------+ // // $Id: IdentityMapper.php,v 1.1 2004/04/16 17:40:06 sebastian Exp $ // require_once 'PHPUnit2/MockObjects/Builder/MatchBuilder.php'; /** * @author Sebastian Bergmann <sb@sebastian-bergmann.de> * @copyright Copyright © 2002-2004 Sebastian Bergmann <sb@sebastian-bergmann.de> * @license http://www.php.net/license/3_0.txt The PHP License, Version 3.0 * @category PHP * @package PHPUnit2 * @subpackage MockObjects */ interface PHPUnit2_MockObjects_Builder_IdentityMapper { // {{{ public function lookupID($id) /** * * * @param String $id * @return PHPUnit2_MockObjects_Builder_MatchBuilder * @access public */ public function lookupID($id); // }}} // {{{ public function registerMethodName($id, PHPUnit2_MockObjects_Builder_MatchBuilder $invocation) /** * * * @param String $id * @param PHPUnit2_MockObjects_Builder_MatchBuilder $invocation * @access public */ public function registerMethodName($id, PHPUnit2_MockObjects_Builder_MatchBuilder $invocation); // }}} // {{{ public function registerUniqueID($id, PHPUnit2_MockObjects_Builder_MatchBuilder $invocation) /** * * * @param String $id * @param PHPUnit2_MockObjects_Builder_MatchBuilder $invocation * @access public */ public function registerUniqueID($id, PHPUnit2_MockObjects_Builder_MatchBuilder $invocation); // }}} } /* * vim600: et sw=2 ts=2 fdm=marker * vim<600: et sw=2 ts=2 */ ?> http://cvs.php.net/co.php/pear/PHPUnit2_MockObjects/MockObjects/Core/DynamicMock.php?r=1.1&p=1 Index: pear/PHPUnit2_MockObjects/MockObjects/Core/DynamicMock.php +++ pear/PHPUnit2_MockObjects/MockObjects/Core/DynamicMock.php <?php // // +------------------------------------------------------------------------+ // | PEAR :: PHPUnit2 :: MockObjects | // +------------------------------------------------------------------------+ // | Copyright (c) 2002-2004 Sebastian Bergmann <sb@sebastian-bergmann.de>. | // +------------------------------------------------------------------------+ // | This source file is subject to version 3.00 of the PHP License, | // | that is available at http://www.php.net/license/3_0.txt. | // | If you did not receive a copy of the PHP license and are unable to | // | obtain it through the world-wide-web, please send a note to | // | license@php.net so we can mail you a copy immediately. | // +------------------------------------------------------------------------+ // // $Id: DynamicMock.php,v 1.1 2004/04/16 17:40:06 sebastian Exp $ // require_once 'PHPUnit2/MockObjects/Core/Invokable.php'; require_once 'PHPUnit2/MockObjects/Core/Stub.php'; require_once 'PHPUnit2/MockObjects/Core/Verifiable.php'; /** * @author Sebastian Bergmann <sb@sebastian-bergmann.de> * @copyright Copyright © 2002-2004 Sebastian Bergmann <sb@sebastian-bergmann.de> * @license http://www.php.net/license/3_0.txt The PHP License, Version 3.0 * @category PHP * @package PHPUnit2 * @subpackage MockObjects */ interface PHPUnit2_MockObjects_Core_DynamicMock extends PHPUnit2_MockObjects_Core_Verifiable { // {{{ public function addInvokable(PHPUnit2_MockObjects_Core_Invokable $invokable) /** * * * @param PHPUnit2_MockObjects_Core_Invokable $invokable * @access public */ public function addInvokable(PHPUnit2_MockObjects_Core_Invokable $invokable); // }}} // {{{ public function getMockedType() /** * * * @return ReflectionClass * @access public */ public function getMockedType(); // }}} // {{{ public function proxy() /** * * * @return Object * @access public */ public function proxy(); // }}} // {{{ public function setDefaultStub(PHPUnit2_MockObjects_Core_Stub $stub) /** * * * @param PHPUnit2_MockObjects_Core_Stub $stub * @access public */ public function setDefaultStub(PHPUnit2_MockObjects_Core_Stub $stub); // }}} // {{{ public function reset() /** * * * @access public */ public function reset(); // }}} } /* * vim600: et sw=2 ts=2 fdm=marker * vim<600: et sw=2 ts=2 */ ?> http://cvs.php.net/co.php/pear/PHPUnit2_MockObjects/MockObjects/Core/Invokable.php?r=1.1&p=1 Index: pear/PHPUnit2_MockObjects/MockObjects/Core/Invokable.php +++ pear/PHPUnit2_MockObjects/MockObjects/Core/Invokable.php <?php // // +------------------------------------------------------------------------+ // | PEAR :: PHPUnit2 :: MockObjects | // +------------------------------------------------------------------------+ // | Copyright (c) 2002-2004 Sebastian Bergmann <sb@sebastian-bergmann.de>. | // +------------------------------------------------------------------------+ // | This source file is subject to version 3.00 of the PHP License, | // | that is available at http://www.php.net/license/3_0.txt. | // | If you did not receive a copy of the PHP license and are unable to | // | obtain it through the world-wide-web, please send a note to | // | license@php.net so we can mail you a copy immediately. | // +------------------------------------------------------------------------+ // // $Id: Invokable.php,v 1.1 2004/04/16 17:40:06 sebastian Exp $ // require_once 'PHPUnit2/MockObjects/Core/Invocation.php'; require_once 'PHPUnit2/MockObjects/Core/SelfDescribing.php'; require_once 'PHPUnit2/MockObjects/Core/Verifiable.php'; /** * @author Sebastian Bergmann <sb@sebastian-bergmann.de> * @copyright Copyright © 2002-2004 Sebastian Bergmann <sb@sebastian-bergmann.de> * @license http://www.php.net/license/3_0.txt The PHP License, Version 3.0 * @category PHP * @package PHPUnit2 * @subpackage MockObjects */ interface PHPUnit2_MockObjects_Core_Invokable extends PHPUnit2_MockObjects_Core_SelfDescribing, PHPUnit2_MockObjects_Core_Verifiable { // {{{ public function matches(PHPUnit2_MockObjects_Core_Invocation $invocation) /** * * * @param PHPUnit2_MockObjects_Core_Invocation $invocation * @return boolean * @access public */ public function matches(PHPUnit2_MockObjects_Core_Invocation $invocation); // }}} // {{{ public function invoke(PHPUnit2_MockObjects_Core_Invocation $invocation) /** * * * @param PHPUnit2_MockObjects_Core_Invocation $invocation * @return Object * @access public */ public function invoke(PHPUnit2_MockObjects_Core_Invocation $invocation); // }}} // {{{ public function hasDescription() /** * * * @return boolean * @access public */ public function hasDescription(); // }}} } /* * vim600: et sw=2 ts=2 fdm=marker * vim<600: et sw=2 ts=2 */ ?> http://cvs.php.net/co.php/pear/PHPUnit2_MockObjects/MockObjects/Core/Stub.php?r=1.1&p=1 Index: pear/PHPUnit2_MockObjects/MockObjects/Core/Stub.php +++ pear/PHPUnit2_MockObjects/MockObjects/Core/Stub.php <?php // // +------------------------------------------------------------------------+ // | PEAR :: PHPUnit2 :: MockObjects | // +------------------------------------------------------------------------+ // | Copyright (c) 2002-2004 Sebastian Bergmann <sb@sebastian-bergmann.de>. | // +------------------------------------------------------------------------+ // | This source file is subject to version 3.00 of the PHP License, | // | that is available at http://www.php.net/license/3_0.txt. | // | If you did not receive a copy of the PHP license and are unable to | // | obtain it through the world-wide-web, please send a note to | // | license@php.net so we can mail you a copy immediately. | // +------------------------------------------------------------------------+ // // $Id: Stub.php,v 1.1 2004/04/16 17:40:06 sebastian Exp $ // require_once 'PHPUnit2/MockObjects/Core/Invocation.php'; require_once 'PHPUnit2/MockObjects/Core/SelfDescribing.php'; /** * @author Sebastian Bergmann <sb@sebastian-bergmann.de> * @copyright Copyright © 2002-2004 Sebastian Bergmann <sb@sebastian-bergmann.de> * @license http://www.php.net/license/3_0.txt The PHP License, Version 3.0 * @category PHP * @package PHPUnit2 * @subpackage MockObjects */ interface PHPUnit2_MockObjects_Core_Stub extends PHPUnit2_MockObjects_Core_SelfDescribing { // {{{ public function invoke(PHPUnit2_MockObjects_Core_Invocation $invocation) /** * Processes the invocation. * * @return mixed * @access public */ public function invoke(PHPUnit2_MockObjects_Core_Invocation $invocation); // }}} } /* * vim600: et sw=2 ts=2 fdm=marker * vim<600: et sw=2 ts=2 */ ?>