xref: /PHP-5.4/ext/tidy/tests/030.phpt (revision 74560ac7)
1--TEST--
2getConfig() method - basic test for getConfig()
3--CREDITS--
4Christian Wenz <wenz@php.net>
5--SKIPIF--
6<?php
7  if (!extension_loaded('tidy')) die ('skip tidy not present');
8?>
9--FILE--
10<?php
11$buffer = '<html></html>';
12$config = array(
13  'indent' => true, // AutoBool
14  'indent-attributes' => true, // Boolean
15  'indent-spaces' => 3, // Integer
16  'language' => 'de'); // String
17$tidy = new tidy();
18$tidy->parseString($buffer, $config);
19$c = $tidy->getConfig();
20var_dump($c['indent']);
21var_dump($c['indent-attributes']);
22var_dump($c['indent-spaces']);
23var_dump($c['language']);
24?>
25--EXPECTF--
26int(1)
27bool(true)
28int(3)
29%s(2) "de"
30