cvs: pear /PHPUnit package.xml /PHPUnit/Extensions/Logger Log.php XML.php

From: Date: Sat, 14 Jun 2003 15:55:35 +0000
Subject: cvs: pear /PHPUnit package.xml /PHPUnit/Extensions/Logger Log.php XML.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-10960@lists.php.net to get a copy of this message
sebastian Sat Jun 14 11:55:35 2003 EDT Added files: /pear/PHPUnit/Extensions/Logger Log.php XML.php Modified files: /pear/PHPUnit package.xml Log: Stubs for PEAR::Log and PEAR::XML::Tree based Loggers to log TestSuite execution using the TestListener interface.

Index: pear/PHPUnit/package.xml diff -u pear/PHPUnit/package.xml:1.41 pear/PHPUnit/package.xml:1.42 --- pear/PHPUnit/package.xml:1.41 Fri Jun 13 04:51:59 2003 +++ pear/PHPUnit/package.xml Sat Jun 14 11:55:35 2003 @@ -24,16 +24,7 @@ <date>2003-XX-XX</date> <notes> <![CDATA[ -+ Added ExceptionTestCase, a TestCase that expects an Exception. - -+ Added PerformanceTestCase, a TestCase that is to be executed - meeting a given time limit. - -+ Added TestRunner and TestRunListener interfaces. - -+ Added TestSetup decorator. - -* CLI SAPI based TestRunner replaces the old PHPUnit class. +* Rewritten from scratch. ! PHPUnit now requires PHP 5 / Zend Engine 2. ]]> @@ -41,6 +32,11 @@ <filelist> <dir name="/" baseinstalldir="PHPUnit"> <dir name="Extensions"> + <dir name="Logger"> + <file role="php">Log.php</file> + <file role="php">XML.php</file> + </dir> + <file role="php">ExceptionTestCase.php</file> <file role="php">PerformanceTestCase.php</file> <file role="php">RepeatedTest.php</file> @@ -117,59 +113,8 @@ <deps> <dep type="php" rel="ge" version="5.0.0" /> <dep type="pkg" rel="has">Benchmark</dep> + <dep optional="yes" type="pkg" rel="has">Log</dep> + <dep optional="yes" type="pkg" rel="has">XML_Tree</dep> </deps> </release> - <changelog> - <release> - <version>0.4</version> - <date>2002-09-25</date> - <notes> -<![CDATA[ -+ Added PHPUnit_Assert::assertFalse() and PHPUnit_Assert::assertNotSame(). - JUnit introduced those two convenience methods in the JUnit 3.8 release. - -* Fixed directory structure. -]]> - </notes> - </release> - <release> - <version>0.3</version> - <date>2002-07-12</date> - <notes> -<![CDATA[ -* Added PHPUnit_TestDecorator and PHPUnit_RepeatedTest. - -* Implemented PHPUnit_TestResult::addListener() and - PHPUnit_TestResult::removeListener(). - -* Added object support to PHPUnit_Assert::assertEquals(). - -* Implemented PHPUnit_Assert::assertSame() using Zend - Engine 2 object handles. -]]> - </notes> - </release> - <release> - <version>0.2</version> - <date>2002-07-11</date> - <notes> -<![CDATA[ -* Added Array support to PHPUnit_Assert::equals(). - (Patch by Wolfram Kriesing <wolfram@kriesing.de>) - -* Added PHPUnit_Assert::assertRegExp(). - (Patch by M@rms <marms@marms.com>) -]]> - </notes> - </release> - <release> - <version>0.1</version> - <date>2002-04-06</date> - <notes> -<![CDATA[ -First release. -]]> - </notes> - </release> - </changelog> </package> Index: pear/PHPUnit/Extensions/Logger/Log.php +++ pear/PHPUnit/Extensions/Logger/Log.php <?php // // +------------------------------------------------------------------------+ // | PEAR :: PHPUnit | // +------------------------------------------------------------------------+ // | Copyright (c) 2002-2003 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: Log.php,v 1.1 2003/06/14 15:55:35 sebastian Exp $ // require_once 'PHPUnit/Framework/TestFailure.php'; require_once 'PHPUnit/Framework/TestListener.php'; require_once 'PHPUnit/Framework/TestResult.php'; require_once 'Log.php'; /** * @package phpunit.extensions.logger * @author Sebastian Bergmann <sb@sebastian-bergmann.de> * Based upon JUnit, see http://www.junit.org/ for details. */ class PHPUnit_Logger_Log implements PHPUnit_Framework_TestListener { // {{{ public function addError(PHPUnit_Framework_Test $test, Exception $e) /** * An error occurred. * * @param PHPUnit_Framework_Test $test * @param Exception $e * @access public */ public function addError(PHPUnit_Framework_Test $test, Exception $e) { } // }}} // {{{ public function addFailure(PHPUnit_Framework_Test $test, PHPUnit_Framework_AssertionFailedError $e) /** * A failure occurred. * * @param PHPUnit_Framework_Test $test * @param PHPUnit_Framework_AssertionFailedError $e * @access public */ public function addFailure(PHPUnit_Framework_Test $test, PHPUnit_Framework_AssertionFailedError $e) { } // }}} // {{{ public function endTest(PHPUnit_Framework_Test $test) /** * A test ended. * * @param PHPUnit_Framework_Test $test * @access public */ public function endTest(PHPUnit_Framework_Test $test) { } // }}} // {{{ public function startTest(PHPUnit_Framework_Test $test) /** * A test started. * * @param PHPUnit_Framework_Test $test * @access public */ public function startTest(PHPUnit_Framework_Test $test) { } // }}} } /* * vim600: et sw=2 ts=2 fdm=marker * vim<600: et sw=2 ts=2 */ ?> Index: pear/PHPUnit/Extensions/Logger/XML.php +++ pear/PHPUnit/Extensions/Logger/XML.php <?php // // +------------------------------------------------------------------------+ // | PEAR :: PHPUnit | // +------------------------------------------------------------------------+ // | Copyright (c) 2002-2003 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: XML.php,v 1.1 2003/06/14 15:55:35 sebastian Exp $ // require_once 'PHPUnit/Framework/TestFailure.php'; require_once 'PHPUnit/Framework/TestListener.php'; require_once 'PHPUnit/Framework/TestResult.php'; require_once 'XML/Tree.php'; /** * @package phpunit.extensions.logger * @author Sebastian Bergmann <sb@sebastian-bergmann.de> * Based upon JUnit, see http://www.junit.org/ for details. */ class PHPUnit_Logger_XML implements PHPUnit_Framework_TestListener { // {{{ Members /** * XML Tree. * * @var XML_Tree * @access private */ private $tree; /** * XML Tree Root Node. * * @var XML_Tree_Node * @access private */ private $xml; // }}} // {{{ public function __construct() /** * @access public */ public function __construct() { $this->tree = new XML_Tree; $this->root = $this->tree->addRoot('run') } // }}} // {{{ public function addError(PHPUnit_Framework_Test $test, Exception $e) /** * An error occurred. * * @param PHPUnit_Framework_Test $test * @param Exception $e * @access public */ public function addError(PHPUnit_Framework_Test $test, Exception $e) { } // }}} // {{{ public function addFailure(PHPUnit_Framework_Test $test, PHPUnit_Framework_AssertionFailedError $e) /** * A failure occurred. * * @param PHPUnit_Framework_Test $test * @param PHPUnit_Framework_AssertionFailedError $e * @access public */ public function addFailure(PHPUnit_Framework_Test $test, PHPUnit_Framework_AssertionFailedError $e) { } // }}} // {{{ public function endTest(PHPUnit_Framework_Test $test) /** * A test ended. * * @param PHPUnit_Framework_Test $test * @access public */ public function endTest(PHPUnit_Framework_Test $test) { } // }}} // {{{ public function startTest(PHPUnit_Framework_Test $test) /** * A test started. * * @param PHPUnit_Framework_Test $test * @access public */ public function startTest(PHPUnit_Framework_Test $test) { } // }}} } /* * vim600: et sw=2 ts=2 fdm=marker * vim<600: et sw=2 ts=2 */ ?>
« previous php.pear.cvs (#10960) next »