- Timestamp:
- 04/06/08 18:18:10 (8 months ago)
- Files:
-
- trunk/XJConf/converters/PrimitiveValueConverter.php (modified) (1 diff)
- trunk/examples/xml/defines.xml (modified) (1 diff)
- trunk/examples/xml/test.xml (modified) (1 diff)
- trunk/tests/integration/Example1TestCase.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/XJConf/converters/PrimitiveValueConverter.php
r125 r135 55 55 case 'integer': 56 56 case 'int': 57 if ('0' === $value{0}) { 58 return octdec($value); 59 } 60 57 61 return (integer) $value; 58 62 case 'double': trunk/examples/xml/defines.xml
r27 r135 1 1 <defines> 2 2 <tag name="zahl" type="integer"/> 3 <tag name="octal" type="integer"/> 3 4 <tag name="foo" type="string"/> 4 5 <tag name="schst" type="UpperString"/> trunk/examples/xml/test.xml
r27 r135 7 7 <foo>tomato</foo> 8 8 <zahl>124</zahl> 9 <octal>0777</octal> 9 10 10 11 <schst>tomato</schst> trunk/tests/integration/Example1TestCase.php
r119 r135 27 27 $tagParser = new DefinitionParser(); 28 28 $defs = $tagParser->parse(EXAMPLES_DIR . '/xml/defines.xml'); 29 $this->assertEqual($defs->countTagDefinitions(), 9);29 $this->assertEqual($defs->countTagDefinitions(), 10); 30 30 31 31 $conf = new XmlParser(); … … 35 35 $this->assertEqual($conf->getConfigValue('foo'), 'tomato'); 36 36 $this->assertEqual($conf->getConfigValue('zahl'), 124); 37 $this->assertEqual($conf->getConfigValue('octal'), 0777); 37 38 $this->assertEqual($conf->getConfigValue('schst')->getString(), 'TOMATO'); 38 39 $this->assertEqual($conf->getConfigValue('complex')->render(), '<font color="red" size="3">This is a string.</font>');
