public function testAllowsFunctionalFilter() { $this->coll->merge(array('fruit' => 'apple', 'number' => 'ten', 'prepositions' => array('about', 'above', 'across', 'after'), 'same_number' => 'ten')); $filtered = $this->coll->filter(function ($key, $value) { return $value == 'ten'; }); $this->assertNotEquals($filtered, $this->coll); $this->assertEquals(array('number' => 'ten', 'same_number' => 'ten'), $filtered->getAll()); }