/** * Fetches the item at the specified index * * @param integer $index The index of an item to fetch * @throws InvalidArgumentException * @throws OutOfRangeException * @return {{foo}} The item at the specified index */ public function at($index) { return parent::at($index); }
public function test_index_returns_value() { $col = new Collection('TestClassA', [new TestClassA(1)]); $res = $col->at(0); $this->assertEquals(new TestClassA(1), $res); }