/include/Savant/Savant2/tests/5_filters.php
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
- <?php
- /**
- *
- * Tests filters and plugins
- *
- * @version $Id: 5_filters.php,v 1.1 2004/10/04 01:52:24 pmjones Exp $
- *
- */
- error_reporting(E_ALL);
- require_once 'Savant2.php';
- $conf = array(
- 'template_path' => 'templates',
- 'resource_path' => 'resources'
- );
- $savant = new Savant2($conf);
- // set up filters
- $savant->loadFilter('colorizeCode');
- $savant->loadFilter('trimwhitespace');
- $savant->loadFilter('fester', null, true);
- // run through the template
- $savant->display('filters.tpl.php');
- // do it again to test object persistence
- $savant->display('filters.tpl.php');
- // do it again to test object persistence
- $savant->display('filters.tpl.php');
- echo "<hr />\n";
- echo "<pre>";
- print_r($savant);
- echo "</pre>";
- ?>