/** * @param Collection $collection * @depends testFind */ public function testFindReceivesKey(Collection $collection) { $actual = []; $collection->find(function ($value, $key) use(&$actual) { $actual[$key] = $value; return false; }); $this->assertSame($collection->toArray(), $actual); }