public function testNot() { $one = $this->createNode(); $two = $this->createNode(); $collection = new NodeCollection([$one, $two], FALSE); $matches = $collection->not(function (Node $node) use($one) { return $node === $one; }); $this->assertCount(1, $matches); $this->assertSame($two, $matches[0]); }