cvs: pear /HTML_CSS/tests HTML_CSS_TestSuite_Bugs.php

From: Date: Sun, 09 Dec 2007 17:59:59 +0000
Subject: cvs: pear /HTML_CSS/tests HTML_CSS_TestSuite_Bugs.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-49681@lists.php.net to get a copy of this message
farell Sun Dec 9 17:59:59 2007 UTC Modified files: /pear/HTML_CSS/tests HTML_CSS_TestSuite_Bugs.php Log: add test case for bogus bug 12039, and thus prevent invalid data source to parse before calling grepStyle http://cvs.php.net/viewvc.cgi/pear/HTML_CSS/tests/HTML_CSS_TestSuite_Bugs.php?r1=1.2&r2=1.3&diff_format=u Index: pear/HTML_CSS/tests/HTML_CSS_TestSuite_Bugs.php diff -u pear/HTML_CSS/tests/HTML_CSS_TestSuite_Bugs.php:1.2 pear/HTML_CSS/tests/HTML_CSS_TestSuite_Bugs.php:1.3 --- pear/HTML_CSS/tests/HTML_CSS_TestSuite_Bugs.php:1.2 Wed Dec 5 10:57:41 2007 +++ pear/HTML_CSS/tests/HTML_CSS_TestSuite_Bugs.php Sun Dec 9 17:59:59 2007 @@ -8,7 +8,7 @@ * @package HTML_CSS * @author Laurent Laville <pear@laurent-laville.org> * @license http://www.opensource.org/licenses/bsd-license.php BSD - * @version CVS: $Id: HTML_CSS_TestSuite_Bugs.php,v 1.2 2007/12/05 10:57:41 farell Exp $ + * @version CVS: $Id: HTML_CSS_TestSuite_Bugs.php,v 1.3 2007/12/09 17:59:59 farell Exp $ * @link http://pear.php.net/package/HTML_CSS * @since File available since Release 1.4.0 */ @@ -304,6 +304,42 @@ } /** + * Regression test for bug #12039 + * + * Even if it was considered as bogus, this test case prevent from invalid + * data source. + * + * @return void + * @link http://pear.php.net/bugs/bug.php?id=12039 + */ + public function testBug12039() + { + $strcss = ' +.back2top { + clear: both; + height: 11px; + text-align: right; +} + +a.top { + background: none no-repeat top left; + text-decoration: none; + width: {IMG_ICON_BACK_TOP_WIDTH}px; + height: {IMG_ICON_BACK_TOP_HEIGHT}px; + display: block; + float: right; + overflow: hidden; + letter-spacing: 1000px; + text-indent: 11px; +} +'; + $e = $this->css->parseString($strcss); + $msg = PEAR::isError($e) ? $e->getMessage() : null; + $this->assertTrue(PEAR::isError($e), $msg); + $this->assertContains('valid CSS structure', $msg); + } + + /** * Regression test for bug #3920 * * @return void

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