Source for file XML.php
Documentation is available at XML.php
// +------------------------------------------------------------------------+
// +------------------------------------------------------------------------+
// | 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: XML.php,v 1.1.2.1 2004/10/01 06:11:53 sebastian Exp $
require_once 'PHPUnit2/Framework/TestFailure.php';
require_once 'PHPUnit2/Framework/TestListener.php';
require_once 'PHPUnit2/Framework/TestResult.php';
require_once 'PHPUnit2/Util/Printer.php';
* A TestListener that generates an XML-based logfile
* The XML markup is based upon the one used by the
* Artima SuiteRunner, see http://www.artima.com/suiterunner/
* @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
private $testFailed = FALSE;
// {{{ public function addError(PHPUnit2_Framework_Test $test, Exception $e)
* @param PHPUnit2_Framework_Test $test
public function addError(PHPUnit2_Framework_Test $test, Exception $e) {
$this->testFailed ($test, $e);
// {{{ public function addFailure(PHPUnit2_Framework_Test $test, PHPUnit2_Framework_AssertionFailedError $e)
* @param PHPUnit2_Framework_Test $test
* @param PHPUnit2_Framework_AssertionFailedError $e
public function addFailure(PHPUnit2_Framework_Test $test, PHPUnit2_Framework_AssertionFailedError $e) {
$this->testFailed ($test, $e);
// {{{ public function addIncompleteTest(PHPUnit2_Framework_Test $test, Exception $e)
* @param PHPUnit2_Framework_Test $test
$this->testFailed ($test, $e, 'Incomplete');
// {{{ public function endTest(PHPUnit2_Framework_Test $test)
* @param PHPUnit2_Framework_Test $test
public function endTest(PHPUnit2_Framework_Test $test) {
if (!$this->testFailed) {
// {{{ public function startTest(PHPUnit2_Framework_Test $test)
* @param PHPUnit2_Framework_Test $test
public function startTest(PHPUnit2_Framework_Test $test) {
$this->testFailed = FALSE;
// {{{ private function testFailed(PHPUnit2_Framework_Test $test, Exception $e)
* @param PHPUnit2_Framework_Test $test
private function testFailed (PHPUnit2_Framework_Test $test, Exception $e, $type = 'Failed') {
" <message>%s</message>\n" .
$this->testFailed = TRUE;
* vim600: et sw=2 ts=2 fdm=marker
Documentation generated on Mon, 11 Mar 2019 13:58:20 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.
|