File tree Expand file tree Collapse file tree 2 files changed +3
-0
lines changed
tests/Rct567/DomQuery/Tests Expand file tree Collapse file tree 2 files changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -564,6 +564,8 @@ public function not($selector)
564564 $ result ->addDomNode ($ node );
565565 }
566566 }
567+ } else {
568+ $ result ->addNodes ($ this ->nodes );
567569 }
568570 }
569571 }
Original file line number Diff line number Diff line change @@ -62,6 +62,7 @@ public function testNot()
6262 $ dom = new DomQuery ('<a>hai</a> <a></a> <a id="mmm"></a> <a class="x"></a> <a class="xpp"></a> ' );
6363 $ selection = $ dom ->find ('a ' );
6464 $ this ->assertEquals (5 , $ selection ->length );
65+ $ this ->assertEquals (5 , $ selection ->not ('p ' )->length );
6566 $ this ->assertEquals (0 , $ selection ->not ('a ' )->length );
6667 $ this ->assertEquals (4 , $ selection ->not ('#mmm ' )->length );
6768 $ this ->assertEquals (3 , $ selection ->not ('#mmm ' )->not ('.xpp ' )->length );
You can’t perform that action at this time.
0 commit comments