cvs: pear /PHPUnit2/Framework Assert.php

From: Date: Mon, 27 Feb 2006 17:19:20 +0000
Subject: cvs: pear /PHPUnit2/Framework Assert.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-38695@lists.php.net to get a copy of this message
sebastian Mon Feb 27 17:19:20 2006 UTC Modified files: /pear/PHPUnit2/Framework Assert.php Log: Add getStub() convenience method. http://cvs.php.net/viewcvs.cgi/pear/PHPUnit2/Framework/Assert.php?r1=1.76&r2=1.77&diff_format=u Index: pear/PHPUnit2/Framework/Assert.php diff -u pear/PHPUnit2/Framework/Assert.php:1.76 pear/PHPUnit2/Framework/Assert.php:1.77 --- pear/PHPUnit2/Framework/Assert.php:1.76 Mon Feb 20 06:45:41 2006 +++ pear/PHPUnit2/Framework/Assert.php Mon Feb 27 17:19:20 2006 @@ -41,7 +41,7 @@ * @author Sebastian Bergmann <sb@sebastian-bergmann.de> * @copyright 2002-2006 Sebastian Bergmann <sb@sebastian-bergmann.de> * @license http://www.opensource.org/licenses/bsd-license.php BSD License - * @version CVS: $Id: Assert.php,v 1.76 2006/02/20 06:45:41 sebastian Exp $ + * @version CVS: $Id: Assert.php,v 1.77 2006/02/27 17:19:20 sebastian Exp $ * @link http://pear.php.net/package/PHPUnit2 * @since File available since Release 2.0.0 */ @@ -972,6 +972,26 @@ } /** + * Returns a stub object for the specified class. + * + * @param string $className + * @param array $methods + * @param array $arguments + * @param string $stubClassName + * @return object + * @access public + * @static + * @since Method available since Release 3.0.0 + */ + public static function getStub($className, Array $methods = array(), Array $arguments = array(), $stubClassName = '') + { + $stub = self::getMock($className, $methods, $arguments, $stubClassName); + $stub->expects($this->anything()); + + return $stub; + } + + /** * Returns the value of an object's property that is declared * protected or private. *

« previous php.pear.cvs (#38695) next »