cvs: pear /PHPUnit2 package.xml /PHPUnit2/Util Printer.php Test.php /PHPUnit2/Util/Log GraphViz.php TAP.php

From: Date: Mon, 27 Feb 2006 05:47:03 +0000
Subject: cvs: pear /PHPUnit2 package.xml /PHPUnit2/Util Printer.php Test.php /PHPUnit2/Util/Log GraphViz.php TAP.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-38659@lists.php.net to get a copy of this message
sebastian Mon Feb 27 05:47:03 2006 UTC Added files: /pear/PHPUnit2/Util Test.php Modified files: /pear/PHPUnit2/Util Printer.php /pear/PHPUnit2/Util/Log GraphViz.php TAP.php /pear/PHPUnit2 package.xml Log: PHPUnit2_Util_Printer::getTestDescription() -> PHPUnit2_Util_Test::describe()

http://cvs.php.net/viewcvs.cgi/pear/PHPUnit2/Util/Printer.php?r1=1.16&r2=1.17&diff_format=u Index: pear/PHPUnit2/Util/Printer.php diff -u pear/PHPUnit2/Util/Printer.php:1.16 pear/PHPUnit2/Util/Printer.php:1.17 --- pear/PHPUnit2/Util/Printer.php:1.16 Wed Jan 4 07:04:52 2006 +++ pear/PHPUnit2/Util/Printer.php Mon Feb 27 05:47:03 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: Printer.php,v 1.16 2006/01/04 07:04:52 sebastian Exp $ + * @version CVS: $Id: Printer.php,v 1.17 2006/02/27 05:47:03 sebastian Exp $ * @link http://pear.php.net/package/PHPUnit2 * @since File available since Release 2.0.0 */ @@ -112,21 +112,6 @@ print $buffer; } } - - /** - * @param PHPUnit2_Framework_Test $test - * @return string - * @access protected - * @since Method available since Release 3.0.0 - */ - protected function getTestDescription(PHPUnit2_Framework_Test $test) - { - if ($test instanceof PHPUnit2_Framework_SelfDescribing) { - return $test->toString(); - } else { - return get_class($test); - } - } } /* http://cvs.php.net/viewcvs.cgi/pear/PHPUnit2/Util/Log/GraphViz.php?r1=1.7&r2=1.8&diff_format=u Index: pear/PHPUnit2/Util/Log/GraphViz.php diff -u pear/PHPUnit2/Util/Log/GraphViz.php:1.7 pear/PHPUnit2/Util/Log/GraphViz.php:1.8 --- pear/PHPUnit2/Util/Log/GraphViz.php:1.7 Sat Jan 7 09:35:27 2006 +++ pear/PHPUnit2/Util/Log/GraphViz.php Mon Feb 27 05:47:03 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: GraphViz.php,v 1.7 2006/01/07 09:35:27 sebastian Exp $ + * @version CVS: $Id: GraphViz.php,v 1.8 2006/02/27 05:47:03 sebastian Exp $ * @link http://pear.php.net/package/PHPUnit2 * @since File available since Release 3.0.0 */ @@ -58,6 +58,7 @@ 'PHPUnit2_Framework_TestListener', 'PHPUnit2_Framework_TestSuite', 'PHPUnit2_Util_Printer', + 'PHPUnit2_Util_Test', 'PHPUnit2_Util_Timer', ) ); @@ -298,7 +299,7 @@ */ private function addTestNode(PHPUnit2_Framework_Test $test, $color) { - $name = $this->getTestDescription($test); + $name = PHPUnit2_Util_Test::describe($test); $this->graph->addNode( $name, http://cvs.php.net/viewcvs.cgi/pear/PHPUnit2/Util/Log/TAP.php?r1=1.15&r2=1.16&diff_format=u Index: pear/PHPUnit2/Util/Log/TAP.php diff -u pear/PHPUnit2/Util/Log/TAP.php:1.15 pear/PHPUnit2/Util/Log/TAP.php:1.16 --- pear/PHPUnit2/Util/Log/TAP.php:1.15 Wed Jan 4 07:04:53 2006 +++ pear/PHPUnit2/Util/Log/TAP.php Mon Feb 27 05:47:03 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: TAP.php,v 1.15 2006/01/04 07:04:53 sebastian Exp $ + * @version CVS: $Id: TAP.php,v 1.16 2006/02/27 05:47:03 sebastian Exp $ * @link http://pear.php.net/package/PHPUnit2 * @since File available since Release 3.0.0 */ @@ -56,6 +56,7 @@ 'PHPUnit2_Framework_TestListener', 'PHPUnit2_Framework_TestSuite', 'PHPUnit2_Util_Printer', + 'PHPUnit2_Util_Test', ) ); @@ -222,7 +223,7 @@ "ok %s - %s\n", $this->testNumber, - $this->getTestDescription($test) + PHPUnit2_Util_Test::describe($test) ) ); } @@ -242,7 +243,7 @@ $this->testNumber, $prefix != '' ? $prefix . ': ' : '', - $this->getTestDescription($test), + PHPUnit2_Util_Test::describe($test), $directive != '' ? ' # ' . $directive : '' ) ); http://cvs.php.net/viewcvs.cgi/pear/PHPUnit2/package.xml?r1=1.175&r2=1.176&diff_format=u Index: pear/PHPUnit2/package.xml diff -u pear/PHPUnit2/package.xml:1.175 pear/PHPUnit2/package.xml:1.176 --- pear/PHPUnit2/package.xml:1.175 Sun Feb 26 19:05:09 2006 +++ pear/PHPUnit2/package.xml Mon Feb 27 05:47:03 2006 @@ -627,6 +627,9 @@ <file name="Getopt.php"> <replace type="package-info" from="@package_version@" to="version"/> </file> + <file name="Test.php"> + <replace type="package-info" from="@package_version@" to="version"/> + </file> <file name="Timer.php"> <replace type="package-info" from="@package_version@" to="version"/> </file> http://cvs.php.net/viewcvs.cgi/pear/PHPUnit2/Util/Test.php?view=markup&rev=1.1 Index: pear/PHPUnit2/Util/Test.php +++ pear/PHPUnit2/Util/Test.php <?php /* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */ /** * PHP Version 5 * * Copyright (c) 2002-2006, Sebastian Bergmann <sb@sebastian-bergmann.de>. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * * Neither the name of Sebastian Bergmann nor the names of his * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * * @category Testing * @package PHPUnit2 * @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: Test.php,v 1.1 2006/02/27 05:47:03 sebastian Exp $ * @link http://pear.php.net/package/PHPUnit2 * @since File available since Release 3.0.0 */ require_once 'PHPUnit2/Util/Classloader.php'; require_once 'PHPUnit2/Util/Filter.php'; PHPUnit2_Util_Classloader::import( array( 'PHPUnit2_Framework_SelfDescribing', 'PHPUnit2_Framework_Test', ) ); PHPUnit2_Util_Filter::addFileToFilter(__FILE__); /** * Test helpers. * * @category Testing * @package PHPUnit2 * @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 Release: @package_version@ * @link http://pear.php.net/package/PHPUnit2 * @since Class available since Release 3.0.0 */ class PHPUnit2_Util_Test { /** * @param PHPUnit2_Framework_Test $test * @return string * @access public * @static * @since Method available since Release 3.0.0 */ public static function describe(PHPUnit2_Framework_Test $test) { if ($test instanceof PHPUnit2_Framework_SelfDescribing) { return $test->toString(); } else { return get_class($test); } } } /* * Local variables: * tab-width: 4 * c-basic-offset: 4 * c-hanging-comment-ender-p: nil * End: */ ?>
« previous php.pear.cvs (#38659) next »