cvs: pear /PHPUnit2/Framework AssertionFailedError.php /PHPUnit2/Util Filter.php
| From: | Sebastian Bergmann | Date: | Fri, 17 Mar 2006 07:22:55 +0000 |
| Subject: | cvs: pear /PHPUnit2/Framework AssertionFailedError.php /PHPUnit2/Util Filter.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-39139@lists.php.net to get a copy of this message | ||
sebastian Fri Mar 17 07:22:55 2006 UTC
Modified files:
/pear/PHPUnit2/Framework AssertionFailedError.php
/pear/PHPUnit2/Util Filter.php
Log:
$levelsOfIndirection--;
http://cvs.php.net/viewcvs.cgi/pear/PHPUnit2/Framework/AssertionFailedError.php?r1=1.17&r2=1.18&diff_format=u
Index: pear/PHPUnit2/Framework/AssertionFailedError.php
diff -u pear/PHPUnit2/Framework/AssertionFailedError.php:1.17
pear/PHPUnit2/Framework/AssertionFailedError.php:1.18
--- pear/PHPUnit2/Framework/AssertionFailedError.php:1.17 Fri Mar 17 07:20:19 2006
+++ pear/PHPUnit2/Framework/AssertionFailedError.php Fri Mar 17 07:22:55 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: AssertionFailedError.php,v 1.17 2006/03/17 07:20:19 sebastian Exp $
+ * @version CVS: $Id: AssertionFailedError.php,v 1.18 2006/03/17 07:22:55 sebastian Exp $
* @link http://pear.php.net/package/PHPUnit2
* @since File available since Release 2.0.0
*/
@@ -80,7 +80,18 @@
*/
public function getLocation()
{
- return PHPUnit2_Util_Filter::getFailureLocation($this);
+ foreach ($this->getTrace() as $frame) {
+ if (!isset($frame['line'])) {
+ break;
+ }
+
+ $result = array(
+ 'file' => $frame['file'],
+ 'line' => $frame['line']
+ );
+ }
+
+ return $result;
}
/**
http://cvs.php.net/viewcvs.cgi/pear/PHPUnit2/Util/Filter.php?r1=1.57&r2=1.58&diff_format=u
Index: pear/PHPUnit2/Util/Filter.php
diff -u pear/PHPUnit2/Util/Filter.php:1.57 pear/PHPUnit2/Util/Filter.php:1.58
--- pear/PHPUnit2/Util/Filter.php:1.57 Fri Mar 17 07:20:19 2006
+++ pear/PHPUnit2/Util/Filter.php Fri Mar 17 07:22:55 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: Filter.php,v 1.57 2006/03/17 07:20:19 sebastian Exp $
+ * @version CVS: $Id: Filter.php,v 1.58 2006/03/17 07:22:55 sebastian Exp $
* @link http://pear.php.net/package/PHPUnit2
* @since File available since Release 2.0.0
*/
@@ -183,31 +183,6 @@
}
/**
- * Returns the location where a failure occured.
- *
- * @param PHPUnit2_Framework_AssertionFailedError $e
- * @return array
- * @access public
- * @static
- * @since Method available since Release 3.0.0
- */
- public static function getFailureLocation(PHPUnit2_Framework_AssertionFailedError $e)
- {
- foreach ($e->getTrace() as $frame) {
- if (!isset($frame['line'])) {
- break;
- }
-
- $result = array(
- 'file' => $frame['file'],
- 'line' => $frame['line']
- );
- }
-
- return $result;
- }
-
- /**
* Activates or deactivates filtering.
*
* @param boolean $filter