File tree Expand file tree Collapse file tree 2 files changed +18
-16
lines changed Expand file tree Collapse file tree 2 files changed +18
-16
lines changed Original file line number Diff line number Diff line change @@ -31,22 +31,22 @@ protected function setUp(): void
3131
3232 $ this ->xmlData = new XMLData (new SimpleXMLElement (
3333 <<<'CODE_SAMPLE'
34- <root>
35- <title>test</title>
36- <attribute test="value">test</attribute>
37- <rates>
38- <rate><name>Marco</name></rate>
39- <rate><name>Polo</name></rate>
40- </rates>
41- <object>
42- <type>x</type>
43- <number>1</number>
44- <child>
45- <title>test</title>
46- </child>
47- </object>
48- </root>
49- CODE_SAMPLE
34+ <root>
35+ <title>test</title>
36+ <attribute test="value" numberZero="0" numberNonZero="1 ">test</attribute>
37+ <rates>
38+ <rate><name>Marco</name></rate>
39+ <rate><name>Polo</name></rate>
40+ </rates>
41+ <object>
42+ <type>x</type>
43+ <number>1</number>
44+ <child>
45+ <title>test</title>
46+ </child>
47+ </object>
48+ </root>
49+ CODE_SAMPLE
5050 ));
5151
5252 $ this ->data = new GetValue ($ this ->xmlData );
Original file line number Diff line number Diff line change @@ -60,6 +60,8 @@ public function testAttributes(): void
6060 $ attributes = $ this ->data ->getXMLAttributesGetter (self ::KeyValueWithAttributes);
6161
6262 $ this ->assertEquals ('value ' , $ attributes ->getRequiredString ('test ' ));
63+ $ this ->assertEquals (0 , $ attributes ->getRequiredInt ('numberZero ' ));
64+ $ this ->assertEquals (1 , $ attributes ->getRequiredInt ('numberNonZero ' ));
6365 }
6466
6567 public function testAttributesOnEntryWithoutAttributes (): void
You can’t perform that action at this time.
0 commit comments