cvs: pear /PHPUnit/Framework TestCase.php TestResult.php

From: Date: Sat, 03 Jan 2004 17:28:10 +0000
Subject: cvs: pear /PHPUnit/Framework TestCase.php TestResult.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-15310@lists.php.net to get a copy of this message
sebastian Sat Jan 3 12:28:10 2004 EDT Modified files: /pear/PHPUnit/Framework TestCase.php TestResult.php Log: Make Xdebug code coverage information available in PHPUnit_Framework_TestResult objects. Index: pear/PHPUnit/Framework/TestCase.php diff -u pear/PHPUnit/Framework/TestCase.php:1.14 pear/PHPUnit/Framework/TestCase.php:1.15 --- pear/PHPUnit/Framework/TestCase.php:1.14 Thu Jan 1 05:31:42 2004 +++ pear/PHPUnit/Framework/TestCase.php Sat Jan 3 12:28:10 2004 @@ -12,7 +12,7 @@ // | license@php.net so we can mail you a copy immediately. | // +------------------------------------------------------------------------+ // -// $Id: TestCase.php,v 1.14 2004/01/01 10:31:42 sebastian Exp $ +// $Id: TestCase.php,v 1.15 2004/01/03 17:28:10 sebastian Exp $ // require_once 'PHPUnit/Framework/Assert.php'; @@ -129,6 +129,19 @@ } // }}} + // {{{ public function getCodeCoverageInformation() + + /** + * Returns the Code Coverage information provided by Xdebug. + * + * @return array + * @access public + */ + public function getCodeCoverageInformation() { + return $this->codeCoverageInformation; + } + + // }}} // {{{ public function getName() /** Index: pear/PHPUnit/Framework/TestResult.php diff -u pear/PHPUnit/Framework/TestResult.php:1.6 pear/PHPUnit/Framework/TestResult.php:1.7 --- pear/PHPUnit/Framework/TestResult.php:1.6 Thu Jan 1 05:31:42 2004 +++ pear/PHPUnit/Framework/TestResult.php Sat Jan 3 12:28:10 2004 @@ -12,7 +12,7 @@ // | license@php.net so we can mail you a copy immediately. | // +------------------------------------------------------------------------+ // -// $Id: TestResult.php,v 1.6 2004/01/01 10:31:42 sebastian Exp $ +// $Id: TestResult.php,v 1.7 2004/01/03 17:28:10 sebastian Exp $ // require_once 'PHPUnit/Framework/AssertionFailedError.php'; @@ -59,6 +59,14 @@ */ private $fStop = false; + /** + * Code Coverage information provided by Xdebug. + * + * @var array + * @access private + */ + private $codeCoverageInformation = array(); + // }}} // {{{ public function addError(PHPUnit_Framework_Test $test, Exception $e) @@ -120,6 +128,8 @@ * @access public */ public function endTest(PHPUnit_Framework_Test $test) { + $this->codeCoverageInformation[$test->getName()] = $test->getCodeCoverageInformation(); + foreach ($this->fListeners as $listener) { $listener->endTest($test); } @@ -178,6 +188,19 @@ } // }}} + // {{{ public function getCodeCoverageInformation() + + /** + * Returns the Code Coverage information provided by Xdebug. + * + * @return array + * @access public + */ + public function getCodeCoverageInformation() { + return $this->codeCoverageInformation; + } + + // }}} // {{{ public function removeListener(PHPUnit_Framework_TestListener $listener) /**

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