root/tags/RELEASE_0_2_0/examples/TestStaticClass.php

Revision 89, 0.7 kB (checked in by mikey, 2 years ago)

added integration tests using the existing examples

Line 
1 <?php
2 require_once '../XJConf/XJConfLoader.php';
3 XJConfLoader::load('DefinitionParser',
4                    'XmlParser'
5 );
6 error_reporting(E_ALL | E_STRICT);
7 require 'Registry.php';
8 /**
9  * @author Stephan Schmidt <stephan.schmidt@schlund.de>
10  */
11 class TestStaticClass
12 {
13
14     public static function main()
15     {
16         $tagParser = new DefinitionParser();
17         $defs = $tagParser->parse(getcwd() . '/xml/defines-static.xml');
18
19         $conf = new XmlParser();
20         $conf->setTagDefinitions($defs);
21
22         try {
23             $conf->parse(getcwd() . '/xml/test-static.xml');
24         } catch (Exception $e) {
25             throw $e;
26             exit();
27         }
28
29         var_dump(Registry::export());
30     }
31 }
32 TestStaticClass::main();
33 ?>
Note: See TracBrowser for help on using the browser.