/** * @param Collection $collection * @depends testAny */ public function testAnyReceivesIndex($collection) { $actual = []; $collection->any(function ($value, $index) use(&$actual) { $actual[$index] = $value; return false; }); $this->assertSame($collection->toArray(), $actual); }