public function testFilterNot() { $seq = new Sequence([1, 2, 3]); $newSeq = $seq->filterNot(function ($n) { return $n === 2; }); $this->assertNotSame($newSeq, $seq); $this->assertCount(3, $seq); $this->assertCount(2, $newSeq); $this->assertSame(1, $newSeq->get(0)); $this->assertSame(3, $newSeq->get(1)); }