cvs: pear /HTML_CSS/tests HTML_CSS_TestCase_addGroupSelector.php HTML_CSS_TestCase_bug1066.php HTML_CSS_TestCase_bug1072.php
HTML_CSS_TestCase_bug1084.php HTML_CSS_TestCase_bug725.php HTML_CSS_TestCase_bug998.php HTML_CSS_TestCase_createGroup.php
HTML_CSS_TestCase_getGroupStyle.php HTML_CSS_TestCase_getStyle.php HTML_CSS_TestCase_parseFile.php HTML_CSS_TestCase_parseSelectors.php
HTML_CSS_TestCase_parseString.php HTML_CSS_TestCase_removeGroupSelector.php HTML_CSS_TestCase_setCache.php HTML_CSS_TestCase_setCharset.php
HTML_CSS_TestCase_setGroupStyle.php HTML_CSS_TestCase_setSameStyle.php HTML_CSS_TestCase_setSingleLineOutput.php HTML_CSS_TestCase_setStyle.php
HTML_CSS_TestCase_setXhtmlCompliance.php HTML_CSS_TestCase_toFile.php HTML_CSS_TestCase_toInline.php HTML_CSS_TestCase_unsetGroup.php
HTML_TestListener.php TestUnit.php index.php

From: Date: Sat, 17 Jun 2006 10:06:33 +0000
Subject: cvs: pear /HTML_CSS/tests HTML_CSS_TestCase_addGroupSelector.php HTML_CSS_TestCase_bug1066.php HTML_CSS_TestCase_bug1072.php
HTML_CSS_TestCase_bug1084.php HTML_CSS_TestCase_bug725.php HTML_CSS_TestCase_bug998.php HTML_CSS_TestCase_createGroup.php
HTML_CSS_TestCase_getGroupStyle.php HTML_CSS_TestCase_getStyle.php HTML_CSS_TestCase_parseFile.php HTML_CSS_TestCase_parseSelectors.php
HTML_CSS_TestCase_parseString.php HTML_CSS_TestCase_removeGroupSelector.php HTML_CSS_TestCase_setCache.php HTML_CSS_TestCase_setCharset.php
HTML_CSS_TestCase_setGroupStyle.php HTML_CSS_TestCase_setSameStyle.php HTML_CSS_TestCase_setSingleLineOutput.php HTML_CSS_TestCase_setStyle.php
HTML_CSS_TestCase_setXhtmlCompliance.php HTML_CSS_TestCase_toFile.php HTML_CSS_TestCase_toInline.php HTML_CSS_TestCase_unsetGroup.php
HTML_TestListener.php TestUnit.php index.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-40779@lists.php.net to get a copy of this message
farell Sat Jun 17 10:06:33 2006 UTC Modified files: /pear/HTML_CSS/tests HTML_CSS_TestCase_addGroupSelector.php HTML_CSS_TestCase_bug1066.php HTML_CSS_TestCase_bug1072.php HTML_CSS_TestCase_bug1084.php HTML_CSS_TestCase_bug725.php HTML_CSS_TestCase_bug998.php HTML_CSS_TestCase_createGroup.php HTML_CSS_TestCase_getGroupStyle.php HTML_CSS_TestCase_getStyle.php HTML_CSS_TestCase_parseFile.php HTML_CSS_TestCase_parseSelectors.php HTML_CSS_TestCase_parseString.php HTML_CSS_TestCase_removeGroupSelector.php HTML_CSS_TestCase_setCache.php HTML_CSS_TestCase_setCharset.php HTML_CSS_TestCase_setGroupStyle.php HTML_CSS_TestCase_setSameStyle.php HTML_CSS_TestCase_setSingleLineOutput.php HTML_CSS_TestCase_setStyle.php HTML_CSS_TestCase_setXhtmlCompliance.php HTML_CSS_TestCase_toFile.php HTML_CSS_TestCase_toInline.php HTML_CSS_TestCase_unsetGroup.php HTML_TestListener.php index.php TestUnit.php Log: - add @ignore phpdoc tag to remove test units from API doc generation - strip unecessary tab and white-space - fixes some indentation

http://cvs.php.net/viewcvs.cgi/pear/HTML_CSS/tests/HTML_CSS_TestCase_addGroupSelector.php?r1=1.6&r2=1.7&diff_format=u Index: pear/HTML_CSS/tests/HTML_CSS_TestCase_addGroupSelector.php diff -u pear/HTML_CSS/tests/HTML_CSS_TestCase_addGroupSelector.php:1.6 pear/HTML_CSS/tests/HTML_CSS_TestCase_addGroupSelector.php:1.7 --- pear/HTML_CSS/tests/HTML_CSS_TestCase_addGroupSelector.php:1.6 Sat Jun 11 13:03:03 2005 +++ pear/HTML_CSS/tests/HTML_CSS_TestCase_addGroupSelector.php Sat Jun 17 10:06:33 2006 @@ -2,13 +2,17 @@ /** * API addGroupSelector Unit tests for HTML_CSS class. * - * @version $Id: HTML_CSS_TestCase_addGroupSelector.php,v 1.6 2005/06/11 13:03:03 farell Exp $ + * @version $Id: HTML_CSS_TestCase_addGroupSelector.php,v 1.7 2006/06/17 10:06:33 farell Exp $ * @author Laurent Laville <pear@laurent-laville.org> * @package HTML_CSS + * @ignore */ require_once 'PEAR.php'; +/** + * @ignore + */ class HTML_CSS_TestCase_addGroupSelector extends PHPUnit_TestCase { /** @@ -68,7 +72,7 @@ $this->assertTrue(false, $msg); } else { $this->assertTrue(true); - } + } } /** http://cvs.php.net/viewcvs.cgi/pear/HTML_CSS/tests/HTML_CSS_TestCase_bug1066.php?r1=1.5&r2=1.6&diff_format=u Index: pear/HTML_CSS/tests/HTML_CSS_TestCase_bug1066.php diff -u pear/HTML_CSS/tests/HTML_CSS_TestCase_bug1066.php:1.5 pear/HTML_CSS/tests/HTML_CSS_TestCase_bug1066.php:1.6 --- pear/HTML_CSS/tests/HTML_CSS_TestCase_bug1066.php:1.5 Wed Jun 15 10:46:49 2005 +++ pear/HTML_CSS/tests/HTML_CSS_TestCase_bug1066.php Sat Jun 17 10:06:33 2006 @@ -2,14 +2,18 @@ /** * BUG #1066 regression test for HTML_CSS class. * - * @version $Id: HTML_CSS_TestCase_bug1066.php,v 1.5 2005/06/15 10:46:49 thesaur Exp $ + * @version $Id: HTML_CSS_TestCase_bug1066.php,v 1.6 2006/06/17 10:06:33 farell Exp $ * @author Laurent Laville <pear@laurent-laville.org> * @package HTML_CSS * @link http://pear.php.net/bugs/bug.php?id=1066 + * @ignore */ require_once 'PEAR.php'; +/** + * @ignore + */ class HTML_CSS_TestCase_bug1066 extends PHPUnit_TestCase { /** @@ -71,7 +75,7 @@ $this->assertTrue(false, $msg); } else { $this->assertTrue(true); - } + } } /** http://cvs.php.net/viewcvs.cgi/pear/HTML_CSS/tests/HTML_CSS_TestCase_bug1072.php?r1=1.3&r2=1.4&diff_format=u Index: pear/HTML_CSS/tests/HTML_CSS_TestCase_bug1072.php diff -u pear/HTML_CSS/tests/HTML_CSS_TestCase_bug1072.php:1.3 pear/HTML_CSS/tests/HTML_CSS_TestCase_bug1072.php:1.4 --- pear/HTML_CSS/tests/HTML_CSS_TestCase_bug1072.php:1.3 Sun Jan 2 23:14:50 2005 +++ pear/HTML_CSS/tests/HTML_CSS_TestCase_bug1072.php Sat Jun 17 10:06:33 2006 @@ -1,15 +1,19 @@ <?php /** * BUG #1072 regression test for HTML_CSS class. - * - * @version $Id: HTML_CSS_TestCase_bug1072.php,v 1.3 2005/01/02 23:14:50 farell Exp $ + * + * @version $Id: HTML_CSS_TestCase_bug1072.php,v 1.4 2006/06/17 10:06:33 farell Exp $ * @author Laurent Laville <pear@laurent-laville.org> * @package HTML_CSS * @link http://pear.php.net/bugs/bug.php?id=1072 + * @ignore */ require_once 'PEAR.php'; +/** + * @ignore + */ class HTML_CSS_TestCase_bug1072 extends PHPUnit_TestCase { /** @@ -45,7 +49,7 @@ unset($this->stylesheet); } - function _methodExists($name) + function _methodExists($name) { if (substr(PHP_VERSION,0,1) < '5') { $n = strtolower($name); @@ -72,13 +76,13 @@ $this->assertTrue(false, $msg); } else { $this->assertTrue(true); - } + } } /** * BUG#1072 HTML_CSS Not cascading properties * - */ + */ function test_bug1072() { if (!$this->_methodExists('getStyle')) { http://cvs.php.net/viewcvs.cgi/pear/HTML_CSS/tests/HTML_CSS_TestCase_bug1084.php?r1=1.6&r2=1.7&diff_format=u Index: pear/HTML_CSS/tests/HTML_CSS_TestCase_bug1084.php diff -u pear/HTML_CSS/tests/HTML_CSS_TestCase_bug1084.php:1.6 pear/HTML_CSS/tests/HTML_CSS_TestCase_bug1084.php:1.7 --- pear/HTML_CSS/tests/HTML_CSS_TestCase_bug1084.php:1.6 Sat Jun 11 12:33:42 2005 +++ pear/HTML_CSS/tests/HTML_CSS_TestCase_bug1084.php Sat Jun 17 10:06:33 2006 @@ -2,14 +2,18 @@ /** * BUG #1084 regression test for HTML_CSS class. * - * @version $Id: HTML_CSS_TestCase_bug1084.php,v 1.6 2005/06/11 12:33:42 farell Exp $ + * @version $Id: HTML_CSS_TestCase_bug1084.php,v 1.7 2006/06/17 10:06:33 farell Exp $ * @author Laurent Laville <pear@laurent-laville.org> * @package HTML_CSS * @link http://pear.php.net/bugs/bug.php?id=1084 + * @ignore */ require_once 'PEAR.php'; +/** + * @ignore + */ class HTML_CSS_TestCase_bug1084 extends PHPUnit_TestCase { /** @@ -64,7 +68,7 @@ $this->assertTrue(false, $msg); } else { $this->assertTrue(true); - } + } } http://cvs.php.net/viewcvs.cgi/pear/HTML_CSS/tests/HTML_CSS_TestCase_bug725.php?r1=1.3&r2=1.4&diff_format=u Index: pear/HTML_CSS/tests/HTML_CSS_TestCase_bug725.php diff -u pear/HTML_CSS/tests/HTML_CSS_TestCase_bug725.php:1.3 pear/HTML_CSS/tests/HTML_CSS_TestCase_bug725.php:1.4 --- pear/HTML_CSS/tests/HTML_CSS_TestCase_bug725.php:1.3 Sun Jan 2 23:14:50 2005 +++ pear/HTML_CSS/tests/HTML_CSS_TestCase_bug725.php Sat Jun 17 10:06:33 2006 @@ -1,15 +1,19 @@ <?php /** * BUG #725 regression test for HTML_CSS class. - * - * @version $Id: HTML_CSS_TestCase_bug725.php,v 1.3 2005/01/02 23:14:50 farell Exp $ + * + * @version $Id: HTML_CSS_TestCase_bug725.php,v 1.4 2006/06/17 10:06:33 farell Exp $ * @author Laurent Laville <pear@laurent-laville.org> * @package HTML_CSS * @link http://pear.php.net/bugs/bug.php?id=725 + * @ignore */ require_once 'PEAR.php'; +/** + * @ignore + */ class HTML_CSS_TestCase_bug725 extends PHPUnit_TestCase { /** @@ -32,10 +36,10 @@ $this->stylesheet = new HTML_CSS($attrs, $prefs); $strcss = " body td { /* 3 spaces between body and td */ - margin: 20px; - padding: 20px; - border: 0; - color: #444; + margin: 20px; + padding: 20px; + border: 0; + color: #444; }"; $this->stylesheet->parseString($strcss); } @@ -45,7 +49,7 @@ unset($this->stylesheet); } - function _methodExists($name) + function _methodExists($name) { if (substr(PHP_VERSION,0,1) < '5') { $n = strtolower($name); @@ -72,14 +76,14 @@ $this->assertTrue(false, $msg); } else { $this->assertTrue(true); - } + } } /** - * BUG#725 differs hierarchy elements with difference in spaces between + * BUG#725 differs hierarchy elements with difference in spaces between * * - setStyle should change the "body td" not add an other one - */ + */ function test_bug725() { if (!$this->_methodExists('setStyle')) { @@ -94,8 +98,8 @@ $c = $this->stylesheet->toFile('testfile_to_remove.css'); $css = $this->stylesheet->toArray(); if (count($css) > 1) { - $e = PEAR::raiseError('setStyle should change the "' . $style - . '" not add an other one', + $e = PEAR::raiseError('setStyle should change the "' . $style + . '" not add an other one', 725); } $this->_getResult($e); http://cvs.php.net/viewcvs.cgi/pear/HTML_CSS/tests/HTML_CSS_TestCase_bug998.php?r1=1.6&r2=1.7&diff_format=u Index: pear/HTML_CSS/tests/HTML_CSS_TestCase_bug998.php diff -u pear/HTML_CSS/tests/HTML_CSS_TestCase_bug998.php:1.6 pear/HTML_CSS/tests/HTML_CSS_TestCase_bug998.php:1.7 --- pear/HTML_CSS/tests/HTML_CSS_TestCase_bug998.php:1.6 Wed Jun 15 10:46:49 2005 +++ pear/HTML_CSS/tests/HTML_CSS_TestCase_bug998.php Sat Jun 17 10:06:33 2006 @@ -2,14 +2,18 @@ /** * BUG #998 regression test for HTML_CSS class. * - * @version $Id: HTML_CSS_TestCase_bug998.php,v 1.6 2005/06/15 10:46:49 thesaur Exp $ + * @version $Id: HTML_CSS_TestCase_bug998.php,v 1.7 2006/06/17 10:06:33 farell Exp $ * @author Laurent Laville <pear@laurent-laville.org> * @package HTML_CSS * @link http://pear.php.net/bugs/bug.php?id=998 + * @ignore */ require_once 'PEAR.php'; +/** + * @ignore + */ class HTML_CSS_TestCase_bug998 extends PHPUnit_TestCase { /** @@ -73,7 +77,7 @@ $this->assertTrue(false, $msg); } else { $this->assertTrue(true); - } + } } /** http://cvs.php.net/viewcvs.cgi/pear/HTML_CSS/tests/HTML_CSS_TestCase_createGroup.php?r1=1.4&r2=1.5&diff_format=u Index: pear/HTML_CSS/tests/HTML_CSS_TestCase_createGroup.php diff -u pear/HTML_CSS/tests/HTML_CSS_TestCase_createGroup.php:1.4 pear/HTML_CSS/tests/HTML_CSS_TestCase_createGroup.php:1.5 --- pear/HTML_CSS/tests/HTML_CSS_TestCase_createGroup.php:1.4 Sun Jan 2 23:14:50 2005 +++ pear/HTML_CSS/tests/HTML_CSS_TestCase_createGroup.php Sat Jun 17 10:06:33 2006 @@ -1,14 +1,18 @@ <?php /** * API createGroup Unit tests for HTML_CSS class. - * - * @version $Id: HTML_CSS_TestCase_createGroup.php,v 1.4 2005/01/02 23:14:50 farell Exp $ + * + * @version $Id: HTML_CSS_TestCase_createGroup.php,v 1.5 2006/06/17 10:06:33 farell Exp $ * @author Laurent Laville <pear@laurent-laville.org> * @package HTML_CSS + * @ignore */ require_once 'PEAR.php'; +/** + * @ignore + */ class HTML_CSS_TestCase_createGroup extends PHPUnit_TestCase { /** @@ -41,7 +45,7 @@ unset($this->stylesheet); } - function _methodExists($name) + function _methodExists($name) { if (substr(PHP_VERSION,0,1) < '5') { $n = strtolower($name); @@ -68,14 +72,14 @@ $this->assertTrue(false, $msg); } else { $this->assertTrue(true); - } + } } /** - * Tests a createGroup method + * Tests a createGroup method * * - fail1: wrong group id - */ + */ function test_createGroup_fail_selectors_no_string() { $g = $this->stylesheet->createGroup(true); http://cvs.php.net/viewcvs.cgi/pear/HTML_CSS/tests/HTML_CSS_TestCase_getGroupStyle.php?r1=1.5&r2=1.6&diff_format=u Index: pear/HTML_CSS/tests/HTML_CSS_TestCase_getGroupStyle.php diff -u pear/HTML_CSS/tests/HTML_CSS_TestCase_getGroupStyle.php:1.5 pear/HTML_CSS/tests/HTML_CSS_TestCase_getGroupStyle.php:1.6 --- pear/HTML_CSS/tests/HTML_CSS_TestCase_getGroupStyle.php:1.5 Fri Jun 10 17:24:27 2005 +++ pear/HTML_CSS/tests/HTML_CSS_TestCase_getGroupStyle.php Sat Jun 17 10:06:33 2006 @@ -2,13 +2,17 @@ /** * API getGroupStyle Unit tests for HTML_CSS class. * - * @version $Id: HTML_CSS_TestCase_getGroupStyle.php,v 1.5 2005/06/10 17:24:27 farell Exp $ + * @version $Id: HTML_CSS_TestCase_getGroupStyle.php,v 1.6 2006/06/17 10:06:33 farell Exp $ * @author Laurent Laville <pear@laurent-laville.org> * @package HTML_CSS + * @ignore */ require_once 'PEAR.php'; +/** + * @ignore + */ class HTML_CSS_TestCase_getGroupStyle extends PHPUnit_TestCase { /** http://cvs.php.net/viewcvs.cgi/pear/HTML_CSS/tests/HTML_CSS_TestCase_getStyle.php?r1=1.5&r2=1.6&diff_format=u Index: pear/HTML_CSS/tests/HTML_CSS_TestCase_getStyle.php diff -u pear/HTML_CSS/tests/HTML_CSS_TestCase_getStyle.php:1.5 pear/HTML_CSS/tests/HTML_CSS_TestCase_getStyle.php:1.6 --- pear/HTML_CSS/tests/HTML_CSS_TestCase_getStyle.php:1.5 Sun Jan 2 23:14:50 2005 +++ pear/HTML_CSS/tests/HTML_CSS_TestCase_getStyle.php Sat Jun 17 10:06:33 2006 @@ -1,14 +1,18 @@ <?php /** * API getStyle Unit tests for HTML_CSS class. - * - * @version $Id: HTML_CSS_TestCase_getStyle.php,v 1.5 2005/01/02 23:14:50 farell Exp $ + * + * @version $Id: HTML_CSS_TestCase_getStyle.php,v 1.6 2006/06/17 10:06:33 farell Exp $ * @author Laurent Laville <pear@laurent-laville.org> * @package HTML_CSS + * @ignore */ require_once 'PEAR.php'; +/** + * @ignore + */ class HTML_CSS_TestCase_getStyle extends PHPUnit_TestCase { /** @@ -41,7 +45,7 @@ unset($this->stylesheet); } - function _methodExists($name) + function _methodExists($name) { if (substr(PHP_VERSION,0,1) < '5') { $n = strtolower($name); @@ -68,12 +72,12 @@ $this->assertTrue(false, $msg); } else { $this->assertTrue(true); - } + } } /** - * Tests a getStyle method - */ + * Tests a getStyle method + */ function test_getStyle_fail_element_no_string() { $element = 2; http://cvs.php.net/viewcvs.cgi/pear/HTML_CSS/tests/HTML_CSS_TestCase_parseFile.php?r1=1.1&r2=1.2&diff_format=u Index: pear/HTML_CSS/tests/HTML_CSS_TestCase_parseFile.php diff -u pear/HTML_CSS/tests/HTML_CSS_TestCase_parseFile.php:1.1 pear/HTML_CSS/tests/HTML_CSS_TestCase_parseFile.php:1.2 --- pear/HTML_CSS/tests/HTML_CSS_TestCase_parseFile.php:1.1 Sun Jan 2 23:14:03 2005 +++ pear/HTML_CSS/tests/HTML_CSS_TestCase_parseFile.php Sat Jun 17 10:06:33 2006 @@ -1,14 +1,18 @@ <?php /** * API parseFile Unit tests for HTML_CSS class. - * - * @version $Id: HTML_CSS_TestCase_parseFile.php,v 1.1 2005/01/02 23:14:03 farell Exp $ + * + * @version $Id: HTML_CSS_TestCase_parseFile.php,v 1.2 2006/06/17 10:06:33 farell Exp $ * @author Laurent Laville <pear@laurent-laville.org> * @package HTML_CSS + * @ignore */ require_once 'PEAR.php'; +/** + * @ignore + */ class HTML_CSS_TestCase_parseFile extends PHPUnit_TestCase { /** @@ -36,7 +40,7 @@ unset($this->stylesheet); } - function _methodExists($name) + function _methodExists($name) { if (substr(PHP_VERSION,0,1) < '5') { $n = strtolower($name); @@ -63,12 +67,12 @@ $this->assertTrue(false, $msg); } else { $this->assertTrue(true); - } + } } /** - * Tests a parseFile method - */ + * Tests a parseFile method + */ function test_parseFile_fail_filename_no_string() { $c = $this->stylesheet->parseFile(100); http://cvs.php.net/viewcvs.cgi/pear/HTML_CSS/tests/HTML_CSS_TestCase_parseSelectors.php?r1=1.3&r2=1.4&diff_format=u Index: pear/HTML_CSS/tests/HTML_CSS_TestCase_parseSelectors.php diff -u pear/HTML_CSS/tests/HTML_CSS_TestCase_parseSelectors.php:1.3 pear/HTML_CSS/tests/HTML_CSS_TestCase_parseSelectors.php:1.4 --- pear/HTML_CSS/tests/HTML_CSS_TestCase_parseSelectors.php:1.3 Sat Jun 11 13:03:03 2005 +++ pear/HTML_CSS/tests/HTML_CSS_TestCase_parseSelectors.php Sat Jun 17 10:06:33 2006 @@ -2,13 +2,17 @@ /** * API parseSelectors Unit tests for HTML_CSS class. * - * @version $Id: HTML_CSS_TestCase_parseSelectors.php,v 1.3 2005/06/11 13:03:03 farell Exp $ + * @version $Id: HTML_CSS_TestCase_parseSelectors.php,v 1.4 2006/06/17 10:06:33 farell Exp $ * @author Laurent Laville <pear@laurent-laville.org> * @package HTML_CSS + * @ignore */ require_once 'PEAR.php'; +/** + * @ignore + */ class HTML_CSS_TestCase_parseSelectors extends PHPUnit_TestCase { /** http://cvs.php.net/viewcvs.cgi/pear/HTML_CSS/tests/HTML_CSS_TestCase_parseString.php?r1=1.1&r2=1.2&diff_format=u Index: pear/HTML_CSS/tests/HTML_CSS_TestCase_parseString.php diff -u pear/HTML_CSS/tests/HTML_CSS_TestCase_parseString.php:1.1 pear/HTML_CSS/tests/HTML_CSS_TestCase_parseString.php:1.2 --- pear/HTML_CSS/tests/HTML_CSS_TestCase_parseString.php:1.1 Sun Jan 2 23:14:03 2005 +++ pear/HTML_CSS/tests/HTML_CSS_TestCase_parseString.php Sat Jun 17 10:06:33 2006 @@ -1,14 +1,18 @@ <?php /** * API parseString Unit tests for HTML_CSS class. - * - * @version $Id: HTML_CSS_TestCase_parseString.php,v 1.1 2005/01/02 23:14:03 farell Exp $ + * + * @version $Id: HTML_CSS_TestCase_parseString.php,v 1.2 2006/06/17 10:06:33 farell Exp $ * @author Laurent Laville <pear@laurent-laville.org> * @package HTML_CSS + * @ignore */ require_once 'PEAR.php'; +/** + * @ignore + */ class HTML_CSS_TestCase_parseString extends PHPUnit_TestCase { /** @@ -36,7 +40,7 @@ unset($this->stylesheet); } - function _methodExists($name) + function _methodExists($name) { if (substr(PHP_VERSION,0,1) < '5') { $n = strtolower($name); @@ -63,12 +67,12 @@ $this->assertTrue(false, $msg); } else { $this->assertTrue(true); - } + } } /** - * Tests a parseString method - */ + * Tests a parseString method + */ function test_parseString_fail_no_string() { $c = $this->stylesheet->parseString(true); http://cvs.php.net/viewcvs.cgi/pear/HTML_CSS/tests/HTML_CSS_TestCase_removeGroupSelector.php?r1=1.6&r2=1.7&diff_format=u Index: pear/HTML_CSS/tests/HTML_CSS_TestCase_removeGroupSelector.php diff -u pear/HTML_CSS/tests/HTML_CSS_TestCase_removeGroupSelector.php:1.6 pear/HTML_CSS/tests/HTML_CSS_TestCase_removeGroupSelector.php:1.7 --- pear/HTML_CSS/tests/HTML_CSS_TestCase_removeGroupSelector.php:1.6 Sat Jun 11 13:03:03 2005 +++ pear/HTML_CSS/tests/HTML_CSS_TestCase_removeGroupSelector.php Sat Jun 17 10:06:33 2006 @@ -2,13 +2,17 @@ /** * API removeGroupSelector Unit tests for HTML_CSS class. * - * @version $Id: HTML_CSS_TestCase_removeGroupSelector.php,v 1.6 2005/06/11 13:03:03 farell Exp $ + * @version $Id: HTML_CSS_TestCase_removeGroupSelector.php,v 1.7 2006/06/17 10:06:33 farell Exp $ * @author Laurent Laville <pear@laurent-laville.org> * @package HTML_CSS + * @ignore */ require_once 'PEAR.php'; +/** + * @ignore + */ class HTML_CSS_TestCase_removeGroupSelector extends PHPUnit_TestCase { /** http://cvs.php.net/viewcvs.cgi/pear/HTML_CSS/tests/HTML_CSS_TestCase_setCache.php?r1=1.1&r2=1.2&diff_format=u Index: pear/HTML_CSS/tests/HTML_CSS_TestCase_setCache.php diff -u pear/HTML_CSS/tests/HTML_CSS_TestCase_setCache.php:1.1 pear/HTML_CSS/tests/HTML_CSS_TestCase_setCache.php:1.2 --- pear/HTML_CSS/tests/HTML_CSS_TestCase_setCache.php:1.1 Sun Jan 2 23:14:03 2005 +++ pear/HTML_CSS/tests/HTML_CSS_TestCase_setCache.php Sat Jun 17 10:06:33 2006 @@ -1,14 +1,18 @@ <?php /** * API setCache Unit tests for HTML_CSS class. - * - * @version $Id: HTML_CSS_TestCase_setCache.php,v 1.1 2005/01/02 23:14:03 farell Exp $ + * + * @version $Id: HTML_CSS_TestCase_setCache.php,v 1.2 2006/06/17 10:06:33 farell Exp $ * @author Laurent Laville <pear@laurent-laville.org> * @package HTML_CSS + * @ignore */ require_once 'PEAR.php'; +/** + * @ignore + */ class HTML_CSS_TestCase_setCache extends PHPUnit_TestCase { /** @@ -36,7 +40,7 @@ unset($this->stylesheet); } - function _methodExists($name) + function _methodExists($name) { if (substr(PHP_VERSION,0,1) < '5') { $n = strtolower($name); @@ -63,12 +67,12 @@ $this->assertTrue(false, $msg); } else { $this->assertTrue(true); - } + } } /** - * Tests a setCache method - */ + * Tests a setCache method + */ function test_setCache_fail_no_boolean() { $c = $this->stylesheet->setCache('true'); http://cvs.php.net/viewcvs.cgi/pear/HTML_CSS/tests/HTML_CSS_TestCase_setCharset.php?r1=1.1&r2=1.2&diff_format=u Index: pear/HTML_CSS/tests/HTML_CSS_TestCase_setCharset.php diff -u pear/HTML_CSS/tests/HTML_CSS_TestCase_setCharset.php:1.1 pear/HTML_CSS/tests/HTML_CSS_TestCase_setCharset.php:1.2 --- pear/HTML_CSS/tests/HTML_CSS_TestCase_setCharset.php:1.1 Sun Jan 2 23:14:03 2005 +++ pear/HTML_CSS/tests/HTML_CSS_TestCase_setCharset.php Sat Jun 17 10:06:33 2006 @@ -1,14 +1,18 @@ <?php /** * API setCharset Unit tests for HTML_CSS class. - * - * @version $Id: HTML_CSS_TestCase_setCharset.php,v 1.1 2005/01/02 23:14:03 farell Exp $ + * + * @version $Id: HTML_CSS_TestCase_setCharset.php,v 1.2 2006/06/17 10:06:33 farell Exp $ * @author Laurent Laville <pear@laurent-laville.org> * @package HTML_CSS + * @ignore */ require_once 'PEAR.php'; +/** + * @ignore + */ class HTML_CSS_TestCase_setCharset extends PHPUnit_TestCase { /** @@ -36,7 +40,7 @@ unset($this->stylesheet); } - function _methodExists($name) + function _methodExists($name) { if (substr(PHP_VERSION,0,1) < '5') { $n = strtolower($name); @@ -63,12 +67,12 @@ $this->assertTrue(false, $msg); } else { $this->assertTrue(true); - } + } } /** - * Tests a setCharset method - */ + * Tests a setCharset method + */ function test_setCharset_fail_no_string() { $c = $this->stylesheet->setCharset(true); http://cvs.php.net/viewcvs.cgi/pear/HTML_CSS/tests/HTML_CSS_TestCase_setGroupStyle.php?r1=1.5&r2=1.6&diff_format=u Index: pear/HTML_CSS/tests/HTML_CSS_TestCase_setGroupStyle.php diff -u pear/HTML_CSS/tests/HTML_CSS_TestCase_setGroupStyle.php:1.5 pear/HTML_CSS/tests/HTML_CSS_TestCase_setGroupStyle.php:1.6 --- pear/HTML_CSS/tests/HTML_CSS_TestCase_setGroupStyle.php:1.5 Fri Jun 10 17:22:43 2005 +++ pear/HTML_CSS/tests/HTML_CSS_TestCase_setGroupStyle.php Sat Jun 17 10:06:33 2006 @@ -2,13 +2,17 @@ /** * API setGroupStyle Unit tests for HTML_CSS class. * - * @version $Id: HTML_CSS_TestCase_setGroupStyle.php,v 1.5 2005/06/10 17:22:43 farell Exp $ + * @version $Id: HTML_CSS_TestCase_setGroupStyle.php,v 1.6 2006/06/17 10:06:33 farell Exp $ * @author Laurent Laville <pear@laurent-laville.org> * @package HTML_CSS + * @ignore */ require_once 'PEAR.php'; +/** + * @ignore + */ class HTML_CSS_TestCase_setGroupStyle extends PHPUnit_TestCase { /** @@ -68,7 +72,7 @@ $this->assertTrue(false, $msg); } else { $this->assertTrue(true); - } + } } /** http://cvs.php.net/viewcvs.cgi/pear/HTML_CSS/tests/HTML_CSS_TestCase_setSameStyle.php?r1=1.4&r2=1.5&diff_format=u Index: pear/HTML_CSS/tests/HTML_CSS_TestCase_setSameStyle.php diff -u pear/HTML_CSS/tests/HTML_CSS_TestCase_setSameStyle.php:1.4 pear/HTML_CSS/tests/HTML_CSS_TestCase_setSameStyle.php:1.5 --- pear/HTML_CSS/tests/HTML_CSS_TestCase_setSameStyle.php:1.4 Sun Jan 2 23:14:50 2005 +++ pear/HTML_CSS/tests/HTML_CSS_TestCase_setSameStyle.php Sat Jun 17 10:06:33 2006 @@ -1,14 +1,18 @@ <?php /** * API setSameStyle Unit tests for HTML_CSS class. - * - * @version $Id: HTML_CSS_TestCase_setSameStyle.php,v 1.4 2005/01/02 23:14:50 farell Exp $ + * + * @version $Id: HTML_CSS_TestCase_setSameStyle.php,v 1.5 2006/06/17 10:06:33 farell Exp $ * @author Laurent Laville <pear@laurent-laville.org> * @package HTML_CSS + * @ignore */ require_once 'PEAR.php'; +/** + * @ignore + */ class HTML_CSS_TestCase_setSameStyle extends PHPUnit_TestCase { /** @@ -41,7 +45,7 @@ unset($this->stylesheet); } - function _methodExists($name) + function _methodExists($name) { if (substr(PHP_VERSION,0,1) < '5') { $n = strtolower($name); @@ -68,13 +72,13 @@ $this->assertTrue(false, $msg); } else { $this->assertTrue(true); - } + } } /** - * Tests a setSameStyle method + * Tests a setSameStyle method * - */ + */ function test_setSameStyle_fail_new_selector_no_string() { $new = 2; http://cvs.php.net/viewcvs.cgi/pear/HTML_CSS/tests/HTML_CSS_TestCase_setSingleLineOutput.php?r1=1.1&r2=1.2&diff_format=u Index: pear/HTML_CSS/tests/HTML_CSS_TestCase_setSingleLineOutput.php diff -u pear/HTML_CSS/tests/HTML_CSS_TestCase_setSingleLineOutput.php:1.1 pear/HTML_CSS/tests/HTML_CSS_TestCase_setSingleLineOutput.php:1.2 --- pear/HTML_CSS/tests/HTML_CSS_TestCase_setSingleLineOutput.php:1.1 Sun Jan 2 23:14:03 2005 +++ pear/HTML_CSS/tests/HTML_CSS_TestCase_setSingleLineOutput.php Sat Jun 17 10:06:33 2006 @@ -1,14 +1,18 @@ <?php /** * API setSingleLineOutput Unit tests for HTML_CSS class. - * - * @version $Id: HTML_CSS_TestCase_setSingleLineOutput.php,v 1.1 2005/01/02 23:14:03 farell Exp $ + * + * @version $Id: HTML_CSS_TestCase_setSingleLineOutput.php,v 1.2 2006/06/17 10:06:33 farell Exp $ * @author Laurent Laville <pear@laurent-laville.org> * @package HTML_CSS + * @ignore */ require_once 'PEAR.php'; +/** + * @ignore + */ class HTML_CSS_TestCase_setSingleLineOutput extends PHPUnit_TestCase { /** @@ -36,7 +40,7 @@ unset($this->stylesheet); } - function _methodExists($name) + function _methodExists($name) { if (substr(PHP_VERSION,0,1) < '5') { $n = strtolower($name); @@ -63,14 +67,14 @@ $this->assertTrue(false, $msg); } else { $this->assertTrue(true); - } + } } /** - * Tests a setSingleLineOutput method + * Tests a setSingleLineOutput method * * - fail1: wrong group id - */ + */ function test_setSingleLineOutput_fail() { $c = $this->stylesheet->setSingleLineOutput('true'); http://cvs.php.net/viewcvs.cgi/pear/HTML_CSS/tests/HTML_CSS_TestCase_setStyle.php?r1=1.1&r2=1.2&diff_format=u Index: pear/HTML_CSS/tests/HTML_CSS_TestCase_setStyle.php diff -u pear/HTML_CSS/tests/HTML_CSS_TestCase_setStyle.php:1.1 pear/HTML_CSS/tests/HTML_CSS_TestCase_setStyle.php:1.2 --- pear/HTML_CSS/tests/HTML_CSS_TestCase_setStyle.php:1.1 Sun Jan 2 23:14:03 2005 +++ pear/HTML_CSS/tests/HTML_CSS_TestCase_setStyle.php Sat Jun 17 10:06:33 2006 @@ -1,14 +1,18 @@ <?php /** * API setStyle Unit tests for HTML_CSS class. - * - * @version $Id: HTML_CSS_TestCase_setStyle.php,v 1.1 2005/01/02 23:14:03 farell Exp $ + * + * @version $Id: HTML_CSS_TestCase_setStyle.php,v 1.2 2006/06/17 10:06:33 farell Exp $ * @author Laurent Laville <pear@laurent-laville.org> * @package HTML_CSS + * @ignore */ require_once 'PEAR.php'; +/** + * @ignore + */ class HTML_CSS_TestCase_setStyle extends PHPUnit_TestCase { /** @@ -41,7 +45,7 @@ unset($this->stylesheet); } - function _methodExists($name) + function _methodExists($name) { if (substr(PHP_VERSION,0,1) < '5') { $n = strtolower($name); @@ -68,13 +72,13 @@ $this->assertTrue(false, $msg); } else { $this->assertTrue(true); - } + } } /** - * Tests a setStyle method + * Tests a setStyle method * - */ + */ function test_setStyle_fail_element_no_string() { $element = 2; http://cvs.php.net/viewcvs.cgi/pear/HTML_CSS/tests/HTML_CSS_TestCase_setXhtmlCompliance.php?r1=1.2&r2=1.3&diff_format=u Index: pear/HTML_CSS/tests/HTML_CSS_TestCase_setXhtmlCompliance.php diff -u pear/HTML_CSS/tests/HTML_CSS_TestCase_setXhtmlCompliance.php:1.2 pear/HTML_CSS/tests/HTML_CSS_TestCase_setXhtmlCompliance.php:1.3 --- pear/HTML_CSS/tests/HTML_CSS_TestCase_setXhtmlCompliance.php:1.2 Sun Jan 2 23:14:50 2005 +++ pear/HTML_CSS/tests/HTML_CSS_TestCase_setXhtmlCompliance.php Sat Jun 17 10:06:33 2006 @@ -1,14 +1,18 @@ <?php /** * API setXhtmlCompliance Unit tests for HTML_CSS class. - * - * @version $Id: HTML_CSS_TestCase_setXhtmlCompliance.php,v 1.2 2005/01/02 23:14:50 farell Exp $ + * + * @version $Id: HTML_CSS_TestCase_setXhtmlCompliance.php,v 1.3 2006/06/17 10:06:33 farell Exp $ * @author Laurent Laville <pear@laurent-laville.org> * @package HTML_CSS + * @ignore */ require_once 'PEAR.php'; +/** + * @ignore + */ class HTML_CSS_TestCase_setXhtmlCompliance extends PHPUnit_TestCase { /** @@ -36,7 +40,7 @@ unset($this->stylesheet); } - function _methodExists($name) + function _methodExists($name) { if (substr(PHP_VERSION,0,1) < '5') { $n = strtolower($name); @@ -63,12 +67,12 @@ $this->assertTrue(false, $msg); } else { $this->assertTrue(true); - } + } } /** - * Tests a setXhtmlCompliance method - */ + * Tests a setXhtmlCompliance method + */ function test_setXhtmlCompliance_fail_no_boolean() { $c = $this->stylesheet->setXhtmlCompliance('true'); http://cvs.php.net/viewcvs.cgi/pear/HTML_CSS/tests/HTML_CSS_TestCase_toFile.php?r1=1.1&r2=1.2&diff_format=u Index: pear/HTML_CSS/tests/HTML_CSS_TestCase_toFile.php diff -u pear/HTML_CSS/tests/HTML_CSS_TestCase_toFile.php:1.1 pear/HTML_CSS/tests/HTML_CSS_TestCase_toFile.php:1.2 --- pear/HTML_CSS/tests/HTML_CSS_TestCase_toFile.php:1.1 Sun Jan 2 23:14:03 2005 +++ pear/HTML_CSS/tests/HTML_CSS_TestCase_toFile.php Sat Jun 17 10:06:33 2006 @@ -1,14 +1,18 @@ <?php /** * API toFile Unit tests for HTML_CSS class. - * - * @version $Id: HTML_CSS_TestCase_toFile.php,v 1.1 2005/01/02 23:14:03 farell Exp $ + * + * @version $Id: HTML_CSS_TestCase_toFile.php,v 1.2 2006/06/17 10:06:33 farell Exp $ * @author Laurent Laville <pear@laurent-laville.org> * @package HTML_CSS + * @ignore */ require_once 'PEAR.php'; +/** + * @ignore + */ class HTML_CSS_TestCase_toFile extends PHPUnit_TestCase { /** @@ -39,7 +43,7 @@ unset($this->stylesheet); } - function _methodExists($name) + function _methodExists($name) { if (substr(PHP_VERSION,0,1) < '5') { $n = strtolower($name); @@ -66,12 +70,12 @@ $this->assertTrue(false, $msg); } else { $this->assertTrue(true); - } + } } /** - * Tests a toFile method - */ + * Tests a toFile method + */ function test_toFile_fail_filename_no_string() { $c = $this->stylesheet->toFile(100); http://cvs.php.net/viewcvs.cgi/pear/HTML_CSS/tests/HTML_CSS_TestCase_toInline.php?r1=1.1&r2=1.2&diff_format=u Index: pear/HTML_CSS/tests/HTML_CSS_TestCase_toInline.php diff -u pear/HTML_CSS/tests/HTML_CSS_TestCase_toInline.php:1.1 pear/HTML_CSS/tests/HTML_CSS_TestCase_toInline.php:1.2 --- pear/HTML_CSS/tests/HTML_CSS_TestCase_toInline.php:1.1 Sun Jan 2 23:14:03 2005 +++ pear/HTML_CSS/tests/HTML_CSS_TestCase_toInline.php Sat Jun 17 10:06:33 2006 @@ -1,14 +1,18 @@ <?php /** * API toInline Unit tests for HTML_CSS class. - * - * @version $Id: HTML_CSS_TestCase_toInline.php,v 1.1 2005/01/02 23:14:03 farell Exp $ + * + * @version $Id: HTML_CSS_TestCase_toInline.php,v 1.2 2006/06/17 10:06:33 farell Exp $ * @author Laurent Laville <pear@laurent-laville.org> * @package HTML_CSS + * @ignore */ require_once 'PEAR.php'; +/** + * @ignore + */ class HTML_CSS_TestCase_toInline extends PHPUnit_TestCase { /** @@ -39,7 +43,7 @@ unset($this->stylesheet); } - function _methodExists($name) + function _methodExists($name) { if (substr(PHP_VERSION,0,1) < '5') { $n = strtolower($name); @@ -66,12 +70,12 @@ $this->assertTrue(false, $msg); } else { $this->assertTrue(true); - } + } } /** - * Tests a toInline method - */ + * Tests a toInline method + */ function test_toInline_fail_element_no_string() { $c = $this->stylesheet->toInline(100); http://cvs.php.net/viewcvs.cgi/pear/HTML_CSS/tests/HTML_CSS_TestCase_unsetGroup.php?r1=1.4&r2=1.5&diff_format=u Index: pear/HTML_CSS/tests/HTML_CSS_TestCase_unsetGroup.php diff -u pear/HTML_CSS/tests/HTML_CSS_TestCase_unsetGroup.php:1.4 pear/HTML_CSS/tests/HTML_CSS_TestCase_unsetGroup.php:1.5 --- pear/HTML_CSS/tests/HTML_CSS_TestCase_unsetGroup.php:1.4 Sun Jan 2 23:14:50 2005 +++ pear/HTML_CSS/tests/HTML_CSS_TestCase_unsetGroup.php Sat Jun 17 10:06:33 2006 @@ -1,14 +1,18 @@ <?php /** * API unsetGroup Unit tests for HTML_CSS class. - * - * @version $Id: HTML_CSS_TestCase_unsetGroup.php,v 1.4 2005/01/02 23:14:50 farell Exp $ + * + * @version $Id: HTML_CSS_TestCase_unsetGroup.php,v 1.5 2006/06/17 10:06:33 farell Exp $ * @author Laurent Laville <pear@laurent-laville.org> * @package HTML_CSS + * @ignore */ require_once 'PEAR.php'; +/** + * @ignore + */ class HTML_CSS_TestCase_unsetGroup extends PHPUnit_TestCase { /** @@ -41,7 +45,7 @@ unset($this->stylesheet); } - function _methodExists($name) + function _methodExists($name) { if (substr(PHP_VERSION,0,1) < '5') { $n = strtolower($name); @@ -68,12 +72,12 @@ $this->assertTrue(false, $msg); } else { $this->assertTrue(true); - } + } } /** - * Tests a unsetGroup method - */ + * Tests a unsetGroup method + */ function test_unsetGroup_fail_invalid_groupid() { $group = $this->css_grpcnt + 1; http://cvs.php.net/viewcvs.cgi/pear/HTML_CSS/tests/HTML_TestListener.php?r1=1.2&r2=1.3&diff_format=u Index: pear/HTML_CSS/tests/HTML_TestListener.php diff -u pear/HTML_CSS/tests/HTML_TestListener.php:1.2 pear/HTML_CSS/tests/HTML_TestListener.php:1.3 --- pear/HTML_CSS/tests/HTML_TestListener.php:1.2 Sun Jan 2 23:14:50 2005 +++ pear/HTML_CSS/tests/HTML_TestListener.php Sat Jun 17 10:06:33 2006 @@ -1,15 +1,16 @@ <?php /** * Provides a nice HTML output for PHPUnit suite tests. - * - * @version $Id: HTML_TestListener.php,v 1.2 2005/01/02 23:14:50 farell Exp $ + * + * @version $Id: HTML_TestListener.php,v 1.3 2006/06/17 10:06:33 farell Exp $ * @author Laurent Laville <pear@laurent-laville.org> * @package HTML_CSS + * @ignore */ -class HTML_TestListener extends PHPUnit_TestListener +class HTML_TestListener extends PHPUnit_TestListener { - function HTML_TestListener() + function HTML_TestListener() { $report = <<<HDR <table cellspacing="1" cellpadding="1" border="0" width="90%" align="center" class="details"> @@ -18,44 +19,44 @@ echo $report; } - function addError(&$test, &$t) + function addError(&$test, &$t) { $this->_errors += 1; } - function addFailure(&$test, &$t) + function addFailure(&$test, &$t) { $this->_fails += 1; } - function endTest(&$test) + function endTest(&$test) { - /* Report both the test result and, for this special situation - where some tests are expected to fail, a "meta" test result - which indicates whether the test result matches the - expected result. - */ - $expect_failure = preg_match('/fail/i', $test->getName()); - $test_passed = ($this->_fails == 0 && $this->_errors == 0); - - if ($this->_errors > 0) { - $outcome = "<span class=\"Error\">ERROR</span>"; - } else if ($this->_fails > 0) { - $outcome = "<span class=\"Failure\">FAIL</span>"; - } else { - $outcome = "<span class=\"Pass\">OK</span>"; + /* Report both the test result and, for this special situation + where some tests are expected to fail, a "meta" test result + which indicates whether the test result matches the + expected result. + */ + $expect_failure = preg_match('/fail/i', $test->getName()); + $test_passed = ($this->_fails == 0 && $this->_errors == 0); + + if ($this->_errors > 0) { + $outcome = "<span class=\"Error\">ERROR</span>"; + } else if ($this->_fails > 0) { + $outcome = "<span class=\"Failure\">FAIL</span>"; + } else { + $outcome = "<span class=\"Pass\">OK</span>"; } - if ($this->_errors > 0) { - $meta_outcome = '<span class="Unknown">unknown</span>'; - } else { - $meta_outcome = ($expect_failure xor $test_passed) - ? '<span class="Expected">as expected</span>' - : '<span class="Unexpected">UNEXPECTED</span>'; + if ($this->_errors > 0) { + $meta_outcome = '<span class="Unknown">unknown</span>'; + } else { + $meta_outcome = ($expect_failure xor $test_passed) + ? '<span class="Expected">as expected</span>' + : '<span class="Unexpected">UNEXPECTED</span>'; } - printf("<td>$outcome</td><td>$meta_outcome</td></tr>"); + printf("<td>$outcome</td><td>$meta_outcome</td></tr>"); } - function startTest(&$test) + function startTest(&$test) { $this->_fails = 0; $this->_errors = 0; http://cvs.php.net/viewcvs.cgi/pear/HTML_CSS/tests/index.php?r1=1.3&r2=1.4&diff_format=u Index: pear/HTML_CSS/tests/index.php diff -u pear/HTML_CSS/tests/index.php:1.3 pear/HTML_CSS/tests/index.php:1.4 --- pear/HTML_CSS/tests/index.php:1.3 Sat Jun 11 13:04:08 2005 +++ pear/HTML_CSS/tests/index.php Sat Jun 17 10:06:33 2006 @@ -2,9 +2,10 @@ /** * HTML output for PHPUnit suite tests. * - * @version $Id: index.php,v 1.3 2005/06/11 13:04:08 farell Exp $ + * @version $Id: index.php,v 1.4 2006/06/17 10:06:33 farell Exp $ * @author Laurent Laville <pear@laurent-laville.org> * @package HTML_CSS + * @ignore */ require_once 'TestUnit.php'; @@ -72,12 +73,12 @@ $suite = new PHPUnit_TestSuite(); foreach ($testcases as $testcase) { - include_once $testcase . '.php'; - $suite->addTestSuite($testcase); + include_once $testcase . '.php'; + $suite->addTestSuite($testcase); } $listener = new HTML_TestListener(); - $result = TestUnit::run($suite, $listener); + $result = TestUnit::run($suite, $listener); $result->removeListener($listener); $result->report(); ?> http://cvs.php.net/viewcvs.cgi/pear/HTML_CSS/tests/TestUnit.php?r1=1.2&r2=1.3&diff_format=u Index: pear/HTML_CSS/tests/TestUnit.php diff -u pear/HTML_CSS/tests/TestUnit.php:1.2 pear/HTML_CSS/tests/TestUnit.php:1.3 --- pear/HTML_CSS/tests/TestUnit.php:1.2 Sun Jan 2 23:14:50 2005 +++ pear/HTML_CSS/tests/TestUnit.php Sat Jun 17 10:06:33 2006 @@ -1,55 +1,59 @@ <?php /** * TestUnit runs a TestSuite and returns a TestResult object. - * And more than PHPUnit attach a listener to TestResult. + * And more than PHPUnit attach a listener to TestResult. * - * @version $Id: TestUnit.php,v 1.2 2005/01/02 23:14:50 farell Exp $ + * @version $Id: TestUnit.php,v 1.3 2006/06/17 10:06:33 farell Exp $ * @author Laurent Laville <pear@laurent-laville.org> * @package HTML_CSS + * @ignore */ require_once 'PHPUnit.php'; -class TestUnit extends PHPUnit +/** + * @ignore + */ +class TestUnit extends PHPUnit { - function &run(&$suite, $listener) + function &run(&$suite, $listener) { $result = new TestResult(); - $result->addListener($listener); + $result->addListener($listener); $suite->run($result); return $result; } } -class TestResult extends PHPUnit_TestResult +class TestResult extends PHPUnit_TestResult { /* report result of test run */ - function report() + function report() { - echo "</TABLE>"; + echo "</TABLE>"; - $nRun = $this->runCount(); - $nErrors = $this->errorCount(); - $nFailures = $this->failureCount(); - echo "<h2>Summary</h2>"; - - printf("<p>%s test%s run.<br>", $nRun, ($nRun > 1) ? 's' : ''); - printf("%s error%s.<br>\n", $nErrors, ($nErrors > 1) ? 's' : ''); - printf("%s failure%s.<br>\n", $nFailures, ($nFailures > 1) ? 's' : ''); - if ($nFailures > 0) { - echo "<h2>Failure Details</h2>"; - print("<ol>\n"); - $failures = $this->failures(); - while (list($i, $failure) = each($failures)) { - $failedTest = $failure->failedTest(); - printf("<li>%s\n", $failedTest->getName() ); - print("<ul>"); - printf("<li>%s\n", $failure->thrownException() ); - print("</ul>"); - } - print("</ol>\n"); - } + $nRun = $this->runCount(); + $nErrors = $this->errorCount(); + $nFailures = $this->failureCount(); + echo "<h2>Summary</h2>"; + + printf("<p>%s test%s run.<br>", $nRun, ($nRun > 1) ? 's' : ''); + printf("%s error%s.<br>\n", $nErrors, ($nErrors > 1) ? 's' : ''); + printf("%s failure%s.<br>\n", $nFailures, ($nFailures > 1) ? 's' : ''); + if ($nFailures > 0) { + echo "<h2>Failure Details</h2>"; + print("<ol>\n"); + $failures = $this->failures(); + while (list($i, $failure) = each($failures)) { + $failedTest = $failure->failedTest(); + printf("<li>%s\n", $failedTest->getName() ); + print("<ul>"); + printf("<li>%s\n", $failure->thrownException() ); + print("</ul>"); + } + print("</ol>\n"); + } } } ?> \ No newline at end of file
« previous php.pear.cvs (#40779) next »