]> granicus.if.org Git - php/commitdiff
Added: Tidy test with invalid configuration options
authorPatrick Allaert <patrickallaert@php.net>
Thu, 27 Aug 2009 08:49:24 +0000 (08:49 +0000)
committerPatrick Allaert <patrickallaert@php.net>
Thu, 27 Aug 2009 08:49:24 +0000 (08:49 +0000)
ext/tidy/tests/tidy_error1.phpt [new file with mode: 0644]

diff --git a/ext/tidy/tests/tidy_error1.phpt b/ext/tidy/tests/tidy_error1.phpt
new file mode 100644 (file)
index 0000000..a924469
--- /dev/null
@@ -0,0 +1,19 @@
+--TEST--
+Notice triggered by invalid configuration options
+--CREDITS--
+Christian Wenz <wenz@php.net>
+--SKIPIF--
+<?php
+  if (!extension_loaded('tidy')) die ('skip tidy not present');
+?>
+--FILE--
+<?php
+$buffer = '<html></html>';
+$config = array('bogus' => 'willnotwork');
+
+$tidy = new tidy();
+var_dump($tidy->parseString($buffer, $config));
+?>
+--EXPECTF--
+Notice: tidy::parseString(): Unknown Tidy Configuration Option 'bogus' in %s on line %d
+bool(true)