PageRenderTime 42ms CodeModel.GetById 16ms RepoModel.GetById 0ms app.codeStats 0ms

/include/Savant/Savant2/tests/5_filters.php

https://github.com/radicaldesigns/amp
PHP | 42 lines | 19 code | 12 blank | 11 comment | 0 complexity | 42f74a6ec5a46240c9ff8c02b751a9a1 MD5 | raw file
Possible License(s): LGPL-2.1, GPL-2.0, BSD-3-Clause, LGPL-2.0, CC-BY-SA-3.0, AGPL-1.0
  1. <?php
  2. /**
  3. *
  4. * Tests filters and plugins
  5. *
  6. * @version $Id: 5_filters.php,v 1.1 2004/10/04 01:52:24 pmjones Exp $
  7. *
  8. */
  9. error_reporting(E_ALL);
  10. require_once 'Savant2.php';
  11. $conf = array(
  12. 'template_path' => 'templates',
  13. 'resource_path' => 'resources'
  14. );
  15. $savant = new Savant2($conf);
  16. // set up filters
  17. $savant->loadFilter('colorizeCode');
  18. $savant->loadFilter('trimwhitespace');
  19. $savant->loadFilter('fester', null, true);
  20. // run through the template
  21. $savant->display('filters.tpl.php');
  22. // do it again to test object persistence
  23. $savant->display('filters.tpl.php');
  24. // do it again to test object persistence
  25. $savant->display('filters.tpl.php');
  26. echo "<hr />\n";
  27. echo "<pre>";
  28. print_r($savant);
  29. echo "</pre>";
  30. ?>