svn: /php/php-src/trunk/ext/tidy/tests/ 030.phpt
| From: | Patrick Allaert | Date: | Thu, 27 Aug 2009 08:50:07 +0000 |
| Subject: | svn: /php/php-src/trunk/ext/tidy/tests/ 030.phpt | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-60248@lists.php.net to get a copy of this message | ||
patrickallaert Thu, 27 Aug 2009 08:50:07 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=287799
Log:
Added: Tidy basic test for getConfig()
Changed paths:
A php/php-src/trunk/ext/tidy/tests/030.phpt
Added: php/php-src/trunk/ext/tidy/tests/030.phpt
===================================================================
--- php/php-src/trunk/ext/tidy/tests/030.phpt (rev 0)
+++ php/php-src/trunk/ext/tidy/tests/030.phpt 2009-08-27 08:50:07 UTC (rev 287799)
@@ -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"