|
Revision 131, 1.2 kB
(checked in by mikey, 1 year ago)
|
changed package separator from dot to Paamayim Nekudotayim
|
| Line | |
|---|
| 1 |
<?php |
|---|
| 2 |
|
|---|
| 3 |
|
|---|
| 4 |
|
|---|
| 5 |
|
|---|
| 6 |
|
|---|
| 7 |
|
|---|
| 8 |
require_once '../XJConf/XJConfLoader.php'; |
|---|
| 9 |
XJConfLoader::load('DefinitionParser', |
|---|
| 10 |
'XmlParser', |
|---|
| 11 |
'ext::Extension' |
|---|
| 12 |
); |
|---|
| 13 |
require 'Color.php'; |
|---|
| 14 |
|
|---|
| 15 |
|
|---|
| 16 |
|
|---|
| 17 |
|
|---|
| 18 |
|
|---|
| 19 |
|
|---|
| 20 |
class TestAttributesRequired |
|---|
| 21 |
{ |
|---|
| 22 |
public static function main() |
|---|
| 23 |
{ |
|---|
| 24 |
$tagParser = new DefinitionParser(); |
|---|
| 25 |
$defs = $tagParser->parse(getcwd() . '/xml/defines-attributes-required.xml'); |
|---|
| 26 |
|
|---|
| 27 |
$conf = new XmlParser(); |
|---|
| 28 |
try { |
|---|
| 29 |
$conf->setTagDefinitions($defs); |
|---|
| 30 |
$conf->parse(getcwd() . '/xml/test-attributes-required.xml'); |
|---|
| 31 |
$color = $conf->getConfigValue('red'); |
|---|
| 32 |
var_dump($color); |
|---|
| 33 |
} catch (Exception $e) { |
|---|
| 34 |
echo 'Caught expected Exception with message: "' . $e->getMessage() . '", showing trace: '; |
|---|
| 35 |
var_dump($e->getTrace()); |
|---|
| 36 |
exit(0); |
|---|
| 37 |
} |
|---|
| 38 |
} |
|---|
| 39 |
} |
|---|
| 40 |
TestAttributesRequired::main(); |
|---|
| 41 |
?> |
|---|