]> granicus.if.org Git - php/commitdiff
Forgot to add these tests
authorJohn Coggeshall <john@php.net>
Wed, 14 Jan 2004 06:57:23 +0000 (06:57 +0000)
committerJohn Coggeshall <john@php.net>
Wed, 14 Jan 2004 06:57:23 +0000 (06:57 +0000)
ext/tidy/tests/016.html [new file with mode: 0644]
ext/tidy/tests/016.phpt [new file with mode: 0644]
ext/tidy/tests/016.tcfg [new file with mode: 0644]
ext/tidy/tests/017.phpt [new file with mode: 0644]

diff --git a/ext/tidy/tests/016.html b/ext/tidy/tests/016.html
new file mode 100644 (file)
index 0000000..7dc6e4a
--- /dev/null
@@ -0,0 +1 @@
+<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
new file mode 100644 (file)
index 0000000..1b0fa1e
--- /dev/null
@@ -0,0 +1,27 @@
+--TEST--
+Passing configuration file through tidy_parse_file()
+--SKIPIF--
+<?php if (!extension_loaded("tidy")) print "skip"; ?>
+--POST--
+--GET--
+--INI--
+--FILE--
+<?php
+        $tidy = tidy_parse_file("ext/tidy/tests/016.html", "ext/tidy/tests/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
new file mode 100644 (file)
index 0000000..fd6e4e4
--- /dev/null
@@ -0,0 +1 @@
+clean: yes
diff --git a/ext/tidy/tests/017.phpt b/ext/tidy/tests/017.phpt
new file mode 100644 (file)
index 0000000..893e902
--- /dev/null
@@ -0,0 +1,20 @@
+--TEST--
+The Tidy Output Buffer Filter
+--SKIPIF--
+<?php if (!extension_loaded("tidy")) print "skip"; ?>
+--POST--
+--GET--
+--INI--
+--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