nlopess Sun Feb 11 16:12:00 2007 UTC Modified files: /php-src/ext/tidy/tests 028.phpt 019.phpt Log: sync tests with php 5.2 http://cvs.php.net/viewvc.cgi/php-src/ext/tidy/tests/028.phpt?r1=1.1&r2=1.2&diff_format=u Index: php-src/ext/tidy/tests/028.phpt diff -u /dev/null php-src/ext/tidy/tests/028.phpt:1.2 --- /dev/null Sun Feb 11 16:12:00 2007 +++ php-src/ext/tidy/tests/028.phpt Sun Feb 11 16:12:00 2007 @@ -0,0 +1,19 @@ +--TEST-- +tidyNode::getParent() +--SKIPIF-- +<?php if (!extension_loaded("tidy")) print "skip"; ?> +--FILE-- +<?php +$x = tidy_parse_string("<body><div>Content</div></body>"); +var_dump($x->body()->child[0]->name); +var_dump($x->body()->child[0]->getParent()->name); +var_dump($x->root()->getParent()); +?> +--EXPECT-- +string(3) "div" +string(4) "body" +NULL +--UEXPECT-- +unicode(3) "div" +unicode(4) "body" +NULL http://cvs.php.net/viewvc.cgi/php-src/ext/tidy/tests/019.phpt?r1=1.2&r2=1.3&diff_format=u Index: php-src/ext/tidy/tests/019.phpt diff -u php-src/ext/tidy/tests/019.phpt:1.2 php-src/ext/tidy/tests/019.phpt:1.3 --- php-src/ext/tidy/tests/019.phpt:1.2 Thu Feb 8 16:37:52 2007 +++ php-src/ext/tidy/tests/019.phpt Sun Feb 11 16:12:00 2007 @@ -1,16 +1,55 @@ --TEST-- -Test getParent() +tidy_repair_*() and invalid parameters --SKIPIF-- <?php if (!extension_loaded("tidy")) print "skip"; ?> --FILE-- <?php -$x = tidy_parse_string("<body><div>Content</div></body>"); -var_dump($x->body()->child[0]->name); -var_dump($x->body()->child[0]->getParent()->name); + +$l = 1; +$s = ""; +$a = array(); + +tidy_repair_string($s, $l, $l, $l); +tidy_repair_string($s, $s, $s, $s); +tidy_repair_string($l, $l, $l ,$l); +tidy_repair_string($a, $a, $a, $a); + +tidy_repair_file($s, $l, $l, $l); +tidy_repair_file($s, $s, $s, $s); +tidy_repair_file($l, $l, $l ,$l); +tidy_repair_file($a, $a, $a, $a); + +echo "Done\n"; ?> ---EXPECT-- -string(3) "div" -string(4) "body" ---UEXPECT-- -unicode(3) "div" -unicode(4) "body" +--EXPECTF-- +Warning: tidy_repair_string(): Could not load configuration file '1' in %s on line %d + +Warning: tidy_repair_string(): Could not set encoding '1' in %s on line %d + +Warning: tidy_repair_string(): Could not load configuration file '' in %s on line %d + +Warning: tidy_repair_string(): Could not load configuration file '1' in %s on line %d + +Warning: tidy_repair_string(): Could not set encoding '1' in %s on line %d + +Warning: tidy_repair_string() expects parameter 1 to be string, array given in %s on line %d + +Warning: tidy_repair_file() expects parameter 1 to be string, array given in %s on line %d +Done +--UEXPECTF-- +Warning: tidy_repair_string(): Could not load configuration file '1' in %s019.php on line 7 + +Warning: tidy_repair_string(): Could not set encoding '1' in %s019.php on line 7 + +Warning: tidy_repair_string() expects parameter 4 to be boolean, Unicode string given in %s019.php on line 8 + +Warning: tidy_repair_string(): Could not load configuration file '1' in %s019.php on line 9 + +Warning: tidy_repair_string(): Could not set encoding '1' in %s019.php on line 9 + +Warning: tidy_repair_string() expects parameter 1 to be binary string, array given in %s019.php on line 10 + +Warning: tidy_repair_file() expects parameter 4 to be boolean, Unicode string given in %s019.php on line 13 + +Warning: tidy_repair_file() expects parameter 1 to be binary string, array given in %s019.php on line 15 +Done
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php