summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Allaert <patrickallaert@php.net>2009-08-27 08:50:07 +0000
committerPatrick Allaert <patrickallaert@php.net>2009-08-27 08:50:07 +0000
commit552d8f483615d20a7be1ddeedbec312e8bb6c770 (patch)
tree943118afedbabc0a63a1927f9e002792e1e80ac1
parente9201af574bea93700523f4bde763dbd6f5a3917 (diff)
downloadphp-git-552d8f483615d20a7be1ddeedbec312e8bb6c770.tar.gz
Added: Tidy basic test for getConfig()
-rw-r--r--ext/tidy/tests/030.phpt29
1 files changed, 29 insertions, 0 deletions
diff --git a/ext/tidy/tests/030.phpt b/ext/tidy/tests/030.phpt
new file mode 100644
index 0000000000..c351f9af15
--- /dev/null
+++ b/ext/tidy/tests/030.phpt
@@ -0,0 +1,29 @@
+--TEST--
+getConfig() method - basic test for getConfig()
+--CREDITS--
+Christian Wenz <wenz@php.net>
+--SKIPIF--
+<?php
+ if (!extension_loaded('tidy')) die ('skip tidy not present');
+?>
+--FILE--
+<?php
+$buffer = '<html></html>';
+$config = array(
+ 'indent' => true, // AutoBool
+ 'indent-attributes' => true, // Boolean
+ 'indent-spaces' => 3, // Integer
+ 'language' => 'de'); // String
+$tidy = new tidy();
+$tidy->parseString($buffer, $config);
+$c = $tidy->getConfig();
+var_dump($c['indent']);
+var_dump($c['indent-attributes']);
+var_dump($c['indent-spaces']);
+var_dump($c['language']);
+?>
+--EXPECTF--
+int(1)
+bool(true)
+int(3)
+%s(2) "de"