030.phpt 500 B

123456789101112131415161718192021222324
  1. --TEST--
  2. getConfig() method - basic test for getConfig()
  3. --CREDITS--
  4. Christian Wenz <wenz@php.net>
  5. --EXTENSIONS--
  6. tidy
  7. --FILE--
  8. <?php
  9. $buffer = '<html></html>';
  10. $config = array(
  11. 'indent' => true, // AutoBool
  12. 'indent-attributes' => true, // Boolean
  13. 'indent-spaces' => 3); // Integer
  14. $tidy = new tidy();
  15. $tidy->parseString($buffer, $config);
  16. $c = $tidy->getConfig();
  17. var_dump($c['indent']);
  18. var_dump($c['indent-attributes']);
  19. var_dump($c['indent-spaces']);
  20. ?>
  21. --EXPECT--
  22. int(1)
  23. bool(true)
  24. int(3)