File tree Expand file tree Collapse file tree 3 files changed +8
-6
lines changed
Expand file tree Collapse file tree 3 files changed +8
-6
lines changed Original file line number Diff line number Diff line change 11# CHANGELOG
22
3+ ## 2.0.3 - 2021/02/01
4+ - issue #3 - getAttributes returns an empty array
5+
36## 2.0.2 - 2021/01/30
47- issue #2 - DOMXPath::query(): Node From Wrong Document
58
Original file line number Diff line number Diff line change @@ -99,12 +99,9 @@ private function getHandlers(?Traversable $nodes): array
9999 }
100100
101101 $ handlers = array ();
102- foreach ($ nodes as $ index => $ node ) {
103- if (!is_int ($ index )) {
104- continue ;
105- }
106-
107- $ handlers [] = $ this ->getDomDocumentHandler ()->getHandler ($ node , $ index );
102+ $ index = 0 ;
103+ foreach ($ nodes as $ node ) {
104+ $ handlers [] = $ this ->getDomDocumentHandler ()->getHandler ($ node , $ index ++);
108105 }
109106
110107 return $ handlers ;
Original file line number Diff line number Diff line change 44
55namespace WsdlToPhp \DomHandler \Tests ;
66
7+ use WsdlToPhp \DomHandler \AbstractAttributeHandler ;
78use WsdlToPhp \DomHandler \AbstractNodeHandler ;
89
910class NodeHandlerTest extends TestCase
@@ -57,6 +58,7 @@ public function testGetAttributes()
5758 $ this ->assertContainsOnlyInstancesOf (AbstractAttributeHandler::class, $ schema ->getAttributes ());
5859 $ this ->assertContainsOnlyInstancesOf (AbstractAttributeHandler::class, $ element ->getAttributes ());
5960 $ this ->assertEmpty ($ sequence ->getAttributes ());
61+ $ this ->assertCount (2 , $ schema ->getAttributes ());
6062 }
6163
6264 public function testHasChildren ()
You can’t perform that action at this time.
0 commit comments