Skip to content

Commit 393ade1

Browse files
committed
add more flexible test for xmlReader
1 parent b57b33f commit 393ade1

File tree

1 file changed

+3
-11
lines changed

1 file changed

+3
-11
lines changed

tests/src/XmlReader/BaseXmlReaderTest.php

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -62,22 +62,14 @@ public function testRead()
6262

6363
$reader = new BaseXmlReader;
6464
$reader->open($file, '/ActualStatuses/ActualStatus');
65-
$result = [];
6665
foreach ($reader as $key => $item) {
6766
}
67+
6868
foreach ($reader as $key => $item) {
69-
$result[$key] = $item;
69+
$this->assertStringContainsString('ActualStatus', $item);
70+
$this->assertStringContainsString('ACTSTATID="' . $key . '', $item);
7071
}
7172
$reader->close();
72-
73-
$this->assertSame(
74-
[
75-
0 => '<ActualStatus ACTSTATID="0" NAME="&#x41D;&#x435; &#x430;&#x43A;&#x442;&#x443;&#x430;&#x43B;&#x44C;&#x43D;&#x44B;&#x439; &lt;&lt;A&gt;&gt;"/>',
76-
1 => '<ActualStatus ACTSTATID="1" NAME="&#x410;&#x43A;&#x442;&#x443;&#x430;&#x43B;&#x44C;&#x43D;&#x44B;&#x439;"/>',
77-
2 => '<ActualStatus ACTSTATID="2" NAME="3-&#x439; &quot;&#x410;&quot;"/>',
78-
],
79-
$result
80-
);
8173
}
8274

8375
/**

0 commit comments

Comments
 (0)