summaryrefslogtreecommitdiff
path: root/ext/tidy/tests
diff options
context:
space:
mode:
Diffstat (limited to 'ext/tidy/tests')
-rw-r--r--ext/tidy/tests/001.phpt10
-rw-r--r--ext/tidy/tests/002.phpt18
-rw-r--r--ext/tidy/tests/003.phpt21
-rw-r--r--ext/tidy/tests/004.phpt17
-rw-r--r--ext/tidy/tests/005.html1
-rw-r--r--ext/tidy/tests/005.phpt18
-rw-r--r--ext/tidy/tests/006.phpt16
-rw-r--r--ext/tidy/tests/007.html1
-rw-r--r--ext/tidy/tests/007.phpt29
-rw-r--r--ext/tidy/tests/008.phpt15
-rw-r--r--ext/tidy/tests/009.phpt19
-rw-r--r--ext/tidy/tests/010.phpt317
-rw-r--r--ext/tidy/tests/011.phpt22
-rw-r--r--ext/tidy/tests/012.phpt473
-rw-r--r--ext/tidy/tests/013.html1
-rw-r--r--ext/tidy/tests/013.phpt13
-rw-r--r--ext/tidy/tests/014.phpt14
-rw-r--r--ext/tidy/tests/015.html1
-rw-r--r--ext/tidy/tests/015.phpt13
-rw-r--r--ext/tidy/tests/016.html1
-rw-r--r--ext/tidy/tests/016.phpt24
-rw-r--r--ext/tidy/tests/016.tcfg1
-rw-r--r--ext/tidy/tests/017.phpt17
-rw-r--r--ext/tidy/tests/018.phpt16
-rw-r--r--ext/tidy/tests/019.phpt38
-rw-r--r--ext/tidy/tests/020.phpt36
-rw-r--r--ext/tidy/tests/021.phpt18
-rw-r--r--ext/tidy/tests/022.phpt38
-rw-r--r--ext/tidy/tests/023.phpt49
29 files changed, 0 insertions, 1257 deletions
diff --git a/ext/tidy/tests/001.phpt b/ext/tidy/tests/001.phpt
deleted file mode 100644
index bfd3782078..0000000000
--- a/ext/tidy/tests/001.phpt
+++ /dev/null
@@ -1,10 +0,0 @@
---TEST--
-Check for tidy presence
---SKIPIF--
-<?php if (!extension_loaded("tidy")) print "skip"; ?>
---FILE--
-<?php
-echo "tidy extension is available";
-?>
---EXPECT--
-tidy extension is available
diff --git a/ext/tidy/tests/002.phpt b/ext/tidy/tests/002.phpt
deleted file mode 100644
index 89c3804b89..0000000000
--- a/ext/tidy/tests/002.phpt
+++ /dev/null
@@ -1,18 +0,0 @@
---TEST--
-tidy_parse_string()
---SKIPIF--
-<?php if (!extension_loaded("tidy")) print "skip"; ?>
---FILE--
-<?php
- $a = tidy_parse_string("<HTML></HTML>");
- echo tidy_get_output($a);
-
-?>
---EXPECT--
-<html>
-<head>
-<title></title>
-</head>
-<body>
-</body>
-</html> \ No newline at end of file
diff --git a/ext/tidy/tests/003.phpt b/ext/tidy/tests/003.phpt
deleted file mode 100644
index 7201d6a5a2..0000000000
--- a/ext/tidy/tests/003.phpt
+++ /dev/null
@@ -1,21 +0,0 @@
---TEST--
-tidy_clean_repair()
---SKIPIF--
-<?php if (!extension_loaded("tidy")) print "skip"; ?>
---FILE--
-<?php
-
- $a = tidy_parse_string("<HTML></HTML>");
- tidy_clean_repair($a);
- echo tidy_get_output($a);
-
-?>
---EXPECT--
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2//EN">
-<html>
-<head>
-<title></title>
-</head>
-<body>
-</body>
-</html>
diff --git a/ext/tidy/tests/004.phpt b/ext/tidy/tests/004.phpt
deleted file mode 100644
index e941de452b..0000000000
--- a/ext/tidy/tests/004.phpt
+++ /dev/null
@@ -1,17 +0,0 @@
---TEST--
-tidy_diagnose()
---SKIPIF--
-<?php if (!extension_loaded("tidy")) print "skip"; ?>
---FILE--
-<?php
- $a = tidy_parse_string("<HTML></HTML>");
- tidy_diagnose($a);
- echo tidy_get_error_buffer($a);
-?>
---EXPECT--
-
-line 1 column 1 - Warning: missing <!DOCTYPE> declaration
-line 1 column 7 - Warning: discarding unexpected </html>
-line 1 column 14 - Warning: inserting missing 'title' element
-Info: Document content looks like HTML 3.2
-3 warnings, 0 errors were found! \ No newline at end of file
diff --git a/ext/tidy/tests/005.html b/ext/tidy/tests/005.html
deleted file mode 100644
index 8c17451f91..0000000000
--- a/ext/tidy/tests/005.html
+++ /dev/null
@@ -1 +0,0 @@
-<HTML></HTML>
diff --git a/ext/tidy/tests/005.phpt b/ext/tidy/tests/005.phpt
deleted file mode 100644
index 1d3a10c2ff..0000000000
--- a/ext/tidy/tests/005.phpt
+++ /dev/null
@@ -1,18 +0,0 @@
---TEST--
-tidy_parse_file()
---SKIPIF--
-<?php if (!extension_loaded("tidy")) print "skip"; ?>
---FILE--
-<?php
- $a = tidy_parse_file(dirname(__FILE__)."/005.html");
- echo tidy_get_output($a);
-
-?>
---EXPECT--
-<html>
-<head>
-<title></title>
-</head>
-<body>
-</body>
-</html> \ No newline at end of file
diff --git a/ext/tidy/tests/006.phpt b/ext/tidy/tests/006.phpt
deleted file mode 100644
index c826181314..0000000000
--- a/ext/tidy/tests/006.phpt
+++ /dev/null
@@ -1,16 +0,0 @@
---TEST--
-Verbose tidy_get_error_buffer()
---SKIPIF--
-<?php if (!extension_loaded("tidy")) print "skip"; ?>
---FILE--
-<?php
- $a = tidy_parse_string("<HTML><asd asdf></HTML>");
- echo tidy_get_error_buffer($a);
-
-?>
---EXPECT--
-line 1 column 1 - Warning: missing <!DOCTYPE> declaration
-line 1 column 7 - Error: <asd> is not recognized!
-line 1 column 7 - Warning: discarding unexpected <asd>
-line 1 column 17 - Warning: discarding unexpected </html>
-line 1 column 7 - Warning: inserting missing 'title' element \ No newline at end of file
diff --git a/ext/tidy/tests/007.html b/ext/tidy/tests/007.html
deleted file mode 100644
index 7dc0357779..0000000000
--- a/ext/tidy/tests/007.html
+++ /dev/null
@@ -1 +0,0 @@
-<B>testing</I>
diff --git a/ext/tidy/tests/007.phpt b/ext/tidy/tests/007.phpt
deleted file mode 100644
index f6bb13d556..0000000000
--- a/ext/tidy/tests/007.phpt
+++ /dev/null
@@ -1,29 +0,0 @@
---TEST--
-Verbose tidy_getopt()
---SKIPIF--
-<?php if (!extension_loaded("tidy")) print "skip"; ?>
---INI--
-tidy.default_config=
---FILE--
-<?php
- $a = new tidy(dirname(__FILE__)."/007.html");
- echo "Current Value of 'tidy-mark': ";
- var_dump($a->getopt("tidy-mark"));
- echo "Current Value of 'error-file': ";
- var_dump($a->getopt("error-file"));
- echo "Current Value of 'tab-size': ";
- var_dump($a->getopt("tab-size"));
-
- var_dump($a->getopt('bogus-opt'));
- var_dump(tidy_getopt($a, 'non-ASCII string àáç'));
-?>
---EXPECTF--
-Current Value of 'tidy-mark': bool(false)
-Current Value of 'error-file': string(0) ""
-Current Value of 'tab-size': int(8)
-
-Warning: tidy::getOpt(): Unknown Tidy Configuration Option 'bogus-opt' in %s007.php on line 10
-bool(false)
-
-Warning: tidy_getopt(): Unknown Tidy Configuration Option 'non-ASCII string àáç' in %s007.php on line 11
-bool(false)
diff --git a/ext/tidy/tests/008.phpt b/ext/tidy/tests/008.phpt
deleted file mode 100644
index 150b98f560..0000000000
--- a/ext/tidy/tests/008.phpt
+++ /dev/null
@@ -1,15 +0,0 @@
---TEST--
-Accessing the error buffer via $obj->error_buf...
---SKIPIF--
-<?php if (!extension_loaded("tidy")) print "skip"; ?>
---FILE--
-<?php
- $a = tidy_parse_string("<HTML><asd asdf></HTML>");
- echo $a->errorBuffer;
-?>
---EXPECT--
-line 1 column 1 - Warning: missing <!DOCTYPE> declaration
-line 1 column 7 - Error: <asd> is not recognized!
-line 1 column 7 - Warning: discarding unexpected <asd>
-line 1 column 17 - Warning: discarding unexpected </html>
-line 1 column 7 - Warning: inserting missing 'title' element \ No newline at end of file
diff --git a/ext/tidy/tests/009.phpt b/ext/tidy/tests/009.phpt
deleted file mode 100644
index 02c65df7cb..0000000000
--- a/ext/tidy/tests/009.phpt
+++ /dev/null
@@ -1,19 +0,0 @@
---TEST--
-tidy_doc object overloading
---SKIPIF--
-<?php if (!extension_loaded("tidy")) print "skip"; ?>
---FILE--
-<?php
-
- $a = tidy_parse_string("<HTML></HTML>");
- echo $a;
-
-?>
---EXPECT--
-<html>
-<head>
-<title></title>
-</head>
-<body>
-</body>
-</html> \ No newline at end of file
diff --git a/ext/tidy/tests/010.phpt b/ext/tidy/tests/010.phpt
deleted file mode 100644
index eabbc0391f..0000000000
--- a/ext/tidy/tests/010.phpt
+++ /dev/null
@@ -1,317 +0,0 @@
---TEST--
-Accessing root, body, html, and head nodes..
---SKIPIF--
-<?php if (!extension_loaded("tidy")) print "skip"; ?>
---FILE--
-<?php
- $a = tidy_parse_string("<HTML><BODY BGCOLOR=#FFFFFF ALINK=#000000></BODY></HTML>");
- var_dump($a->root());
- var_dump($a->body());
- var_dump($a->html());
- var_dump($a->head());
-
-?>
---EXPECT--
-object(tidyNode)#2 (8) {
- ["value"]=>
- string(94) "<html>
-<head>
-<title></title>
-</head>
-<body bgcolor="#FFFFFF" alink="#000000">
-</body>
-</html>"
- ["name"]=>
- string(0) ""
- ["type"]=>
- int(0)
- ["line"]=>
- int(1)
- ["column"]=>
- int(1)
- ["proprietary"]=>
- bool(false)
- ["attribute"]=>
- NULL
- ["child"]=>
- array(1) {
- [0]=>
- &object(tidyNode)#3 (9) {
- ["value"]=>
- string(94) "<html>
-<head>
-<title></title>
-</head>
-<body bgcolor="#FFFFFF" alink="#000000">
-</body>
-</html>"
- ["name"]=>
- string(4) "html"
- ["type"]=>
- int(5)
- ["line"]=>
- int(1)
- ["column"]=>
- int(1)
- ["proprietary"]=>
- bool(false)
- ["id"]=>
- int(48)
- ["attribute"]=>
- NULL
- ["child"]=>
- array(2) {
- [0]=>
- &object(tidyNode)#4 (9) {
- ["value"]=>
- string(31) "<head>
-<title></title>
-</head>
-"
- ["name"]=>
- string(4) "head"
- ["type"]=>
- int(5)
- ["line"]=>
- int(1)
- ["column"]=>
- int(7)
- ["proprietary"]=>
- bool(false)
- ["id"]=>
- int(46)
- ["attribute"]=>
- NULL
- ["child"]=>
- array(1) {
- [0]=>
- &object(tidyNode)#5 (9) {
- ["value"]=>
- string(16) "<title></title>
-"
- ["name"]=>
- string(5) "title"
- ["type"]=>
- int(5)
- ["line"]=>
- int(1)
- ["column"]=>
- int(57)
- ["proprietary"]=>
- bool(false)
- ["id"]=>
- int(111)
- ["attribute"]=>
- NULL
- ["child"]=>
- NULL
- }
- }
- }
- [1]=>
- &object(tidyNode)#6 (9) {
- ["value"]=>
- string(49) "<body bgcolor="#FFFFFF" alink="#000000">
-</body>
-"
- ["name"]=>
- string(4) "body"
- ["type"]=>
- int(5)
- ["line"]=>
- int(1)
- ["column"]=>
- int(7)
- ["proprietary"]=>
- bool(false)
- ["id"]=>
- int(16)
- ["attribute"]=>
- array(2) {
- ["bgcolor"]=>
- string(7) "#FFFFFF"
- ["alink"]=>
- string(7) "#000000"
- }
- ["child"]=>
- NULL
- }
- }
- }
- }
-}
-object(tidyNode)#2 (9) {
- ["value"]=>
- string(49) "<body bgcolor="#FFFFFF" alink="#000000">
-</body>
-"
- ["name"]=>
- string(4) "body"
- ["type"]=>
- int(5)
- ["line"]=>
- int(1)
- ["column"]=>
- int(7)
- ["proprietary"]=>
- bool(false)
- ["id"]=>
- int(16)
- ["attribute"]=>
- array(2) {
- ["bgcolor"]=>
- string(7) "#FFFFFF"
- ["alink"]=>
- string(7) "#000000"
- }
- ["child"]=>
- NULL
-}
-object(tidyNode)#2 (9) {
- ["value"]=>
- string(94) "<html>
-<head>
-<title></title>
-</head>
-<body bgcolor="#FFFFFF" alink="#000000">
-</body>
-</html>"
- ["name"]=>
- string(4) "html"
- ["type"]=>
- int(5)
- ["line"]=>
- int(1)
- ["column"]=>
- int(1)
- ["proprietary"]=>
- bool(false)
- ["id"]=>
- int(48)
- ["attribute"]=>
- NULL
- ["child"]=>
- array(2) {
- [0]=>
- &object(tidyNode)#3 (9) {
- ["value"]=>
- string(31) "<head>
-<title></title>
-</head>
-"
- ["name"]=>
- string(4) "head"
- ["type"]=>
- int(5)
- ["line"]=>
- int(1)
- ["column"]=>
- int(7)
- ["proprietary"]=>
- bool(false)
- ["id"]=>
- int(46)
- ["attribute"]=>
- NULL
- ["child"]=>
- array(1) {
- [0]=>
- &object(tidyNode)#6 (9) {
- ["value"]=>
- string(16) "<title></title>
-"
- ["name"]=>
- string(5) "title"
- ["type"]=>
- int(5)
- ["line"]=>
- int(1)
- ["column"]=>
- int(57)
- ["proprietary"]=>
- bool(false)
- ["id"]=>
- int(111)
- ["attribute"]=>
- NULL
- ["child"]=>
- NULL
- }
- }
- }
- [1]=>
- &object(tidyNode)#4 (9) {
- ["value"]=>
- string(49) "<body bgcolor="#FFFFFF" alink="#000000">
-</body>
-"
- ["name"]=>
- string(4) "body"
- ["type"]=>
- int(5)
- ["line"]=>
- int(1)
- ["column"]=>
- int(7)
- ["proprietary"]=>
- bool(false)
- ["id"]=>
- int(16)
- ["attribute"]=>
- array(2) {
- ["bgcolor"]=>
- string(7) "#FFFFFF"
- ["alink"]=>
- string(7) "#000000"
- }
- ["child"]=>
- NULL
- }
- }
-}
-object(tidyNode)#2 (9) {
- ["value"]=>
- string(31) "<head>
-<title></title>
-</head>
-"
- ["name"]=>
- string(4) "head"
- ["type"]=>
- int(5)
- ["line"]=>
- int(1)
- ["column"]=>
- int(7)
- ["proprietary"]=>
- bool(false)
- ["id"]=>
- int(46)
- ["attribute"]=>
- NULL
- ["child"]=>
- array(1) {
- [0]=>
- &object(tidyNode)#4 (9) {
- ["value"]=>
- string(16) "<title></title>
-"
- ["name"]=>
- string(5) "title"
- ["type"]=>
- int(5)
- ["line"]=>
- int(1)
- ["column"]=>
- int(57)
- ["proprietary"]=>
- bool(false)
- ["id"]=>
- int(111)
- ["attribute"]=>
- NULL
- ["child"]=>
- NULL
- }
- }
-}
diff --git a/ext/tidy/tests/011.phpt b/ext/tidy/tests/011.phpt
deleted file mode 100644
index 2a94616759..0000000000
--- a/ext/tidy/tests/011.phpt
+++ /dev/null
@@ -1,22 +0,0 @@
---TEST--
-Accessing attributes of a node
---SKIPIF--
-<?php if (!extension_loaded("tidy")) print "skip"; ?>
---FILE--
-<?php
- $a = tidy_parse_string("<HTML><BODY BGCOLOR=#FFFFFF ALINK=#000000></BODY></HTML>");
- $body = $a->body();
- var_dump($body->attribute);
- foreach($body->attribute as $key=>$val) {
- echo "Attrib '$key': $val\n";
- }
-?>
---EXPECT--
-array(2) {
- ["bgcolor"]=>
- string(7) "#FFFFFF"
- ["alink"]=>
- string(7) "#000000"
-}
-Attrib 'bgcolor': #FFFFFF
-Attrib 'alink': #000000 \ No newline at end of file
diff --git a/ext/tidy/tests/012.phpt b/ext/tidy/tests/012.phpt
deleted file mode 100644
index 43fff38df5..0000000000
--- a/ext/tidy/tests/012.phpt
+++ /dev/null
@@ -1,473 +0,0 @@
---TEST--
-Accessing children nodes
---SKIPIF--
-<?php if (!extension_loaded("tidy")) print "skip"; ?>
---FILE--
-<?php
-
- function dump_nodes(tidyNode $node) {
-
- var_dump($node->hasChildren());
- if($node->hasChildren()) {
-
- foreach($node->child as $c) {
-
- var_dump($c);
-
- if($c->hasChildren()) {
-
- dump_nodes($c);
-
- }
- }
-
- }
-
- }
-
- $a = tidy_parse_string("<HTML><BODY BGCOLOR=#FFFFFF ALINK=#000000><B>Hi</B><I>Bye<U>Test</U></I></BODY></HTML>");
- $html = $a->html();
- dump_nodes($html);
-
-?>
---EXPECT--
-bool(true)
-object(tidyNode)#3 (9) {
- ["value"]=>
- string(31) "<head>
-<title></title>
-</head>
-"
- ["name"]=>
- string(4) "head"
- ["type"]=>
- int(5)
- ["line"]=>
- int(1)
- ["column"]=>
- int(7)
- ["proprietary"]=>
- bool(false)
- ["id"]=>
- int(46)
- ["attribute"]=>
- NULL
- ["child"]=>
- array(1) {
- [0]=>
- &object(tidyNode)#4 (9) {
- ["value"]=>
- string(16) "<title></title>
-"
- ["name"]=>
- string(5) "title"
- ["type"]=>
- int(5)
- ["line"]=>
- int(1)
- ["column"]=>
- int(87)
- ["proprietary"]=>
- bool(false)
- ["id"]=>
- int(111)
- ["attribute"]=>
- NULL
- ["child"]=>
- NULL
- }
- }
-}
-bool(true)
-object(tidyNode)#4 (9) {
- ["value"]=>
- string(16) "<title></title>
-"
- ["name"]=>
- string(5) "title"
- ["type"]=>
- int(5)
- ["line"]=>
- int(1)
- ["column"]=>
- int(87)
- ["proprietary"]=>
- bool(false)
- ["id"]=>
- int(111)
- ["attribute"]=>
- NULL
- ["child"]=>
- NULL
-}
-object(tidyNode)#5 (9) {
- ["value"]=>
- string(80) "<body bgcolor="#FFFFFF" alink="#000000">
-<b>Hi</b><i>Bye<u>Test</u></i>
-</body>
-"
- ["name"]=>
- string(4) "body"
- ["type"]=>
- int(5)
- ["line"]=>
- int(1)
- ["column"]=>
- int(7)
- ["proprietary"]=>
- bool(false)
- ["id"]=>
- int(16)
- ["attribute"]=>
- array(2) {
- ["bgcolor"]=>
- string(7) "#FFFFFF"
- ["alink"]=>
- string(7) "#000000"
- }
- ["child"]=>
- array(2) {
- [0]=>
- &object(tidyNode)#6 (9) {
- ["value"]=>
- string(9) "<b>Hi</b>"
- ["name"]=>
- string(1) "b"
- ["type"]=>
- int(5)
- ["line"]=>
- int(1)
- ["column"]=>
- int(43)
- ["proprietary"]=>
- bool(false)
- ["id"]=>
- int(8)
- ["attribute"]=>
- NULL
- ["child"]=>
- array(1) {
- [0]=>
- &object(tidyNode)#7 (8) {
- ["value"]=>
- string(2) "Hi"
- ["name"]=>
- string(0) ""
- ["type"]=>
- int(4)
- ["line"]=>
- int(1)
- ["column"]=>
- int(46)
- ["proprietary"]=>
- bool(false)
- ["attribute"]=>
- NULL
- ["child"]=>
- NULL
- }
- }
- }
- [1]=>
- &object(tidyNode)#8 (9) {
- ["value"]=>
- string(21) "<i>Bye<u>Test</u></i>"
- ["name"]=>
- string(1) "i"
- ["type"]=>
- int(5)
- ["line"]=>
- int(1)
- ["column"]=>
- int(52)
- ["proprietary"]=>
- bool(false)
- ["id"]=>
- int(49)
- ["attribute"]=>
- NULL
- ["child"]=>
- array(2) {
- [0]=>
- &object(tidyNode)#9 (8) {
- ["value"]=>
- string(3) "Bye"
- ["name"]=>
- string(0) ""
- ["type"]=>
- int(4)
- ["line"]=>
- int(1)
- ["column"]=>
- int(55)
- ["proprietary"]=>
- bool(false)
- ["attribute"]=>
- NULL
- ["child"]=>
- NULL
- }
- [1]=>
- &object(tidyNode)#10 (9) {
- ["value"]=>
- string(11) "<u>Test</u>"
- ["name"]=>
- string(1) "u"
- ["type"]=>
- int(5)
- ["line"]=>
- int(1)
- ["column"]=>
- int(58)
- ["proprietary"]=>
- bool(false)
- ["id"]=>
- int(114)
- ["attribute"]=>
- NULL
- ["child"]=>
- array(1) {
- [0]=>
- &object(tidyNode)#11 (8) {
- ["value"]=>
- string(4) "Test"
- ["name"]=>
- string(0) ""
- ["type"]=>
- int(4)
- ["line"]=>
- int(1)
- ["column"]=>
- int(61)
- ["proprietary"]=>
- bool(false)
- ["attribute"]=>
- NULL
- ["child"]=>
- NULL
- }
- }
- }
- }
- }
- }
-}
-bool(true)
-object(tidyNode)#6 (9) {
- ["value"]=>
- string(9) "<b>Hi</b>"
- ["name"]=>
- string(1) "b"
- ["type"]=>
- int(5)
- ["line"]=>
- int(1)
- ["column"]=>
- int(43)
- ["proprietary"]=>
- bool(false)
- ["id"]=>
- int(8)
- ["attribute"]=>
- NULL
- ["child"]=>
- array(1) {
- [0]=>
- &object(tidyNode)#7 (8) {
- ["value"]=>
- string(2) "Hi"
- ["name"]=>
- string(0) ""
- ["type"]=>
- int(4)
- ["line"]=>
- int(1)
- ["column"]=>
- int(46)
- ["proprietary"]=>
- bool(false)
- ["attribute"]=>
- NULL
- ["child"]=>
- NULL
- }
- }
-}
-bool(true)
-object(tidyNode)#7 (8) {
- ["value"]=>
- string(2) "Hi"
- ["name"]=>
- string(0) ""
- ["type"]=>
- int(4)
- ["line"]=>
- int(1)
- ["column"]=>
- int(46)
- ["proprietary"]=>
- bool(false)
- ["attribute"]=>
- NULL
- ["child"]=>
- NULL
-}
-object(tidyNode)#8 (9) {
- ["value"]=>
- string(21) "<i>Bye<u>Test</u></i>"
- ["name"]=>
- string(1) "i"
- ["type"]=>
- int(5)
- ["line"]=>
- int(1)
- ["column"]=>
- int(52)
- ["proprietary"]=>
- bool(false)
- ["id"]=>
- int(49)
- ["attribute"]=>
- NULL
- ["child"]=>
- array(2) {
- [0]=>
- &object(tidyNode)#9 (8) {
- ["value"]=>
- string(3) "Bye"
- ["name"]=>
- string(0) ""
- ["type"]=>
- int(4)
- ["line"]=>
- int(1)
- ["column"]=>
- int(55)
- ["proprietary"]=>
- bool(false)
- ["attribute"]=>
- NULL
- ["child"]=>
- NULL
- }
- [1]=>
- &object(tidyNode)#10 (9) {
- ["value"]=>
- string(11) "<u>Test</u>"
- ["name"]=>
- string(1) "u"
- ["type"]=>
- int(5)
- ["line"]=>
- int(1)
- ["column"]=>
- int(58)
- ["proprietary"]=>
- bool(false)
- ["id"]=>
- int(114)
- ["attribute"]=>
- NULL
- ["child"]=>
- array(1) {
- [0]=>
- &object(tidyNode)#11 (8) {
- ["value"]=>
- string(4) "Test"
- ["name"]=>
- string(0) ""
- ["type"]=>
- int(4)
- ["line"]=>
- int(1)
- ["column"]=>
- int(61)
- ["proprietary"]=>
- bool(false)
- ["attribute"]=>
- NULL
- ["child"]=>
- NULL
- }
- }
- }
- }
-}
-bool(true)
-object(tidyNode)#9 (8) {
- ["value"]=>
- string(3) "Bye"
- ["name"]=>
- string(0) ""
- ["type"]=>
- int(4)
- ["line"]=>
- int(1)
- ["column"]=>
- int(55)
- ["proprietary"]=>
- bool(false)
- ["attribute"]=>
- NULL
- ["child"]=>
- NULL
-}
-object(tidyNode)#10 (9) {
- ["value"]=>
- string(11) "<u>Test</u>"
- ["name"]=>
- string(1) "u"
- ["type"]=>
- int(5)
- ["line"]=>
- int(1)
- ["column"]=>
- int(58)
- ["proprietary"]=>
- bool(false)
- ["id"]=>
- int(114)
- ["attribute"]=>
- NULL
- ["child"]=>
- array(1) {
- [0]=>
- &object(tidyNode)#11 (8) {
- ["value"]=>
- string(4) "Test"
- ["name"]=>
- string(0) ""
- ["type"]=>
- int(4)
- ["line"]=>
- int(1)
- ["column"]=>
- int(61)
- ["proprietary"]=>
- bool(false)
- ["attribute"]=>
- NULL
- ["child"]=>
- NULL
- }
- }
-}
-bool(true)
-object(tidyNode)#11 (8) {
- ["value"]=>
- string(4) "Test"
- ["name"]=>
- string(0) ""
- ["type"]=>
- int(4)
- ["line"]=>
- int(1)
- ["column"]=>
- int(61)
- ["proprietary"]=>
- bool(false)
- ["attribute"]=>
- NULL
- ["child"]=>
- NULL
-}
diff --git a/ext/tidy/tests/013.html b/ext/tidy/tests/013.html
deleted file mode 100644
index 7dc0357779..0000000000
--- a/ext/tidy/tests/013.html
+++ /dev/null
@@ -1 +0,0 @@
-<B>testing</I>
diff --git a/ext/tidy/tests/013.phpt b/ext/tidy/tests/013.phpt
deleted file mode 100644
index 8f1ac94ef4..0000000000
--- a/ext/tidy/tests/013.phpt
+++ /dev/null
@@ -1,13 +0,0 @@
---TEST--
-Parsing a file using constructor
---SKIPIF--
-<?php if (!extension_loaded("tidy")) print "skip"; ?>
---FILE--
-<?php
- $tidy = new tidy(dirname(__FILE__)."/013.html", array("show-body-only"=>true));
- $tidy->cleanRepair();
- echo $tidy;
-
-?>
---EXPECT--
-<b>testing</b>
diff --git a/ext/tidy/tests/014.phpt b/ext/tidy/tests/014.phpt
deleted file mode 100644
index a391b3dc9e..0000000000
--- a/ext/tidy/tests/014.phpt
+++ /dev/null
@@ -1,14 +0,0 @@
---TEST--
-Passing configuration options through tidy_parse_string().
---SKIPIF--
-<?php if (!extension_loaded("tidy")) print "skip"; ?>
---FILE--
-<?php
- $text = "<B>testing</I>";
- $tidy = tidy_parse_string($text, array('show-body-only'=>true));
- tidy_clean_repair($tidy);
- echo tidy_get_output($tidy);
-
-?>
---EXPECT--
-<b>testing</b> \ No newline at end of file
diff --git a/ext/tidy/tests/015.html b/ext/tidy/tests/015.html
deleted file mode 100644
index 7dc0357779..0000000000
--- a/ext/tidy/tests/015.html
+++ /dev/null
@@ -1 +0,0 @@
-<B>testing</I>
diff --git a/ext/tidy/tests/015.phpt b/ext/tidy/tests/015.phpt
deleted file mode 100644
index 03018ffa19..0000000000
--- a/ext/tidy/tests/015.phpt
+++ /dev/null
@@ -1,13 +0,0 @@
---TEST--
-Passing configuration options through tidy_parse_file().
---SKIPIF--
-<?php if (!extension_loaded("tidy")) print "skip"; ?>
---FILE--
-<?php
- $tidy = tidy_parse_file(dirname(__FILE__)."/015.html", array('show-body-only'=>true));
- tidy_clean_repair($tidy);
- echo tidy_get_output($tidy);
-
-?>
---EXPECT--
-<b>testing</b> \ No newline at end of file
diff --git a/ext/tidy/tests/016.html b/ext/tidy/tests/016.html
deleted file mode 100644
index 7dc6e4aba8..0000000000
--- a/ext/tidy/tests/016.html
+++ /dev/null
@@ -1 +0,0 @@
-<P><B><FONT SIZE=10 COLOR=#FF0000>testing</FONT></I></P>
diff --git a/ext/tidy/tests/016.phpt b/ext/tidy/tests/016.phpt
deleted file mode 100644
index 001371aa3e..0000000000
--- a/ext/tidy/tests/016.phpt
+++ /dev/null
@@ -1,24 +0,0 @@
---TEST--
-Passing configuration file through tidy_parse_file() (may fail with buggy libtidy)
---SKIPIF--
-<?php if (!extension_loaded("tidy")) print "skip"; ?>
---FILE--
-<?php
- $tidy = tidy_parse_file(dirname(__FILE__)."/016.html", dirname(__FILE__)."/016.tcfg");
- tidy_clean_repair($tidy);
- echo tidy_get_output($tidy);
-?>
---EXPECT--
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2//EN">
-<html>
-<head>
-<title></title>
-
-<style type="text/css">
- p.c1 {font-weight: bold}
-</style>
-</head>
-<body>
-<p class="c1">testing</p>
-</body>
-</html>
diff --git a/ext/tidy/tests/016.tcfg b/ext/tidy/tests/016.tcfg
deleted file mode 100644
index fd6e4e44f4..0000000000
--- a/ext/tidy/tests/016.tcfg
+++ /dev/null
@@ -1 +0,0 @@
-clean: yes
diff --git a/ext/tidy/tests/017.phpt b/ext/tidy/tests/017.phpt
deleted file mode 100644
index ba620a32ec..0000000000
--- a/ext/tidy/tests/017.phpt
+++ /dev/null
@@ -1,17 +0,0 @@
---TEST--
-The Tidy Output Buffer Filter
---SKIPIF--
-<?php if (!extension_loaded("tidy")) print "skip"; ?>
---FILE--
-<?php ob_start("ob_tidyhandler"); ?>
-<B>testing</I>
---EXPECT--
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2//EN">
-<html>
-<head>
-<title></title>
-</head>
-<body>
-<b>testing</b>
-</body>
-</html> \ No newline at end of file
diff --git a/ext/tidy/tests/018.phpt b/ext/tidy/tests/018.phpt
deleted file mode 100644
index 405a46d42b..0000000000
--- a/ext/tidy/tests/018.phpt
+++ /dev/null
@@ -1,16 +0,0 @@
---TEST--
-binary safety
---SKIPIF--
-<?php if (!extension_loaded("tidy")) print "skip"; ?>
---FILE--
-<?php
-$x = tidy_repair_string("<p>abra\0cadabra</p>",
- array( 'show-body-only' => true,
- 'clean' => false,
- 'newline' => "\n")
- );
-var_dump($x);
-?>
---EXPECT--
-string(19) "<p>abracadabra</p>
-"
diff --git a/ext/tidy/tests/019.phpt b/ext/tidy/tests/019.phpt
deleted file mode 100644
index 9d2c693cdb..0000000000
--- a/ext/tidy/tests/019.phpt
+++ /dev/null
@@ -1,38 +0,0 @@
---TEST--
-tidy_repair_*() and invalid parameters
---SKIPIF--
-<?php if (!extension_loaded("tidy")) print "skip"; ?>
---FILE--
-<?php
-
-$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";
-?>
---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
diff --git a/ext/tidy/tests/020.phpt b/ext/tidy/tests/020.phpt
deleted file mode 100644
index dbfda96375..0000000000
--- a/ext/tidy/tests/020.phpt
+++ /dev/null
@@ -1,36 +0,0 @@
---TEST--
-OO API
---SKIPIF--
-<?php if (!extension_loaded("tidy")) print "skip"; ?>
---FILE--
-<?php
-
-$tidy = new tidy();
-$str = <<<EOF
-<p>Isto é um texto em Português<br>
-para testes.</p>
-EOF;
-
-$tidy->parseString($str, array('output-xhtml'=>1), 'latin1');
-$tidy->cleanRepair();
-$tidy->diagnose();
-var_dump(tidy_warning_count($tidy) > 0);
-var_dump(strlen($tidy->errorBuffer) > 50);
-
-echo $tidy;
-?>
---EXPECT--
-bool(true)
-bool(true)
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<title></title>
-</head>
-<body>
-<p>Isto é um texto em Português<br />
-para testes.</p>
-</body>
-</html>
diff --git a/ext/tidy/tests/021.phpt b/ext/tidy/tests/021.phpt
deleted file mode 100644
index bdf954617b..0000000000
--- a/ext/tidy/tests/021.phpt
+++ /dev/null
@@ -1,18 +0,0 @@
---TEST--
-tidy_get_opt_doc()
---SKIPIF--
-<?php if (!extension_loaded("tidy") || !function_exists('tidy_get_opt_doc')) print "skip"; ?>
---FILE--
-<?php
-
-var_dump(tidy_get_opt_doc(new tidy, 'some_bogus_cfg'));
-
-$t = new tidy;
-var_dump($t->getOptDoc('ncr'));
-var_dump(strlen(tidy_get_opt_doc($t, 'wrap')) > 99);
-?>
---EXPECTF--
-Warning: tidy_get_opt_doc(): Unknown Tidy Configuration Option 'some_bogus_cfg' in %s021.php on line 3
-bool(false)
-string(73) "This option specifies if Tidy should allow numeric character references. "
-bool(true)
diff --git a/ext/tidy/tests/022.phpt b/ext/tidy/tests/022.phpt
deleted file mode 100644
index 9d2c693cdb..0000000000
--- a/ext/tidy/tests/022.phpt
+++ /dev/null
@@ -1,38 +0,0 @@
---TEST--
-tidy_repair_*() and invalid parameters
---SKIPIF--
-<?php if (!extension_loaded("tidy")) print "skip"; ?>
---FILE--
-<?php
-
-$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";
-?>
---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
diff --git a/ext/tidy/tests/023.phpt b/ext/tidy/tests/023.phpt
deleted file mode 100644
index e7ee4b3c0c..0000000000
--- a/ext/tidy/tests/023.phpt
+++ /dev/null
@@ -1,49 +0,0 @@
---TEST--
-tidy and tidyNode OO
---SKIPIF--
-<?php if (!extension_loaded('tidy')) echo 'skip'; ?>
---FILE--
-<?php
-
-//test leaks here:
-new tidyNode();
-var_dump(new tidyNode());
-new tidy();
-var_dump(new tidy());
-
-echo "-------\n";
-
-$x = new tidyNode();
-var_dump($x->isHtml());
-
-$tidy = new tidy();
-$tidy->parseString('<html><?php echo "xpto;" ?></html>');
-
-var_dump(tidy_get_root($tidy)->child[0]->isHtml());
-var_dump(tidy_get_root($tidy)->child[0]->child[0]->isPHP());
-var_dump(tidy_get_root($tidy)->child[0]->child[0]->isAsp());
-var_dump(tidy_get_root($tidy)->child[0]->child[0]->isJste());
-var_dump(tidy_get_root($tidy)->child[0]->child[0]->type === TIDY_NODETYPE_PHP);
-
-var_dump(tidy_get_root($tidy)->child[0]->hasChildren());
-var_dump(tidy_get_root($tidy)->child[0]->child[0]->hasChildren());
-
-?>
---EXPECT--
-object(tidyNode)#1 (0) {
-}
-object(tidy)#1 (2) {
- ["errorBuffer"]=>
- NULL
- ["value"]=>
- NULL
-}
--------
-bool(false)
-bool(true)
-bool(true)
-bool(false)
-bool(false)
-bool(true)
-bool(true)
-bool(false)