/** * @test */ public function canGetNthElement() { $data = ['foo', 'bar', 'baz']; $collection = new Collection($data); $this->assertEquals('bar', $collection->getNth(1)); $this->assertEquals('baz', $collection->getNth(2)); }