public function testFilterNot() { $map = new Map(array('a' => 'b', 'c' => 'd', 'e' => 'f')); $newMap = $map->filterNot(function ($v) { return $v === 'd'; }); $this->assertNotSame($newMap, $map); $this->assertCount(3, $map); $this->assertCount(2, $newMap); $this->assertEquals(array('a' => 'b', 'e' => 'f'), iterator_to_array($newMap)); }