From: Nuno Lopes Date: Sun, 11 Feb 2007 16:12:00 +0000 (+0000) Subject: sync tests with php 5.2 X-Git-Tag: RELEASE_1_0_1~283 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b0b2d070502be6b8174a0d3bc352c9169ec539a7;p=php sync tests with php 5.2 --- diff --git a/ext/tidy/tests/019.phpt b/ext/tidy/tests/019.phpt index 2b2496081a..5f6bab4f98 100644 --- a/ext/tidy/tests/019.phpt +++ b/ext/tidy/tests/019.phpt @@ -1,16 +1,55 @@ --TEST-- -Test getParent() +tidy_repair_*() and invalid parameters --SKIPIF-- --FILE--
Content
"); -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 diff --git a/ext/tidy/tests/028.phpt b/ext/tidy/tests/028.phpt new file mode 100644 index 0000000000..0c3928c7a7 --- /dev/null +++ b/ext/tidy/tests/028.phpt @@ -0,0 +1,19 @@ +--TEST-- +tidyNode::getParent() +--SKIPIF-- + +--FILE-- +
Content
"); +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