/** @test * */ public function it_keys_records_with_closure() { $this->rs->keyResultsBy(function (Record $record) { return $record->get('id') . '_' . $record->get('name'); }); $this->assertTrue(is_object($this->rs->find('1_left'))); $this->assertSame('up', $this->rs->find('1_left')->get('value')); }