/** * Testing toArray() */ public function testToArray() { $collection = new Collection(array('Apple', 'Orange', 'Banana')); $arr = $collection->toArray(); $this->assertEquals('Apple', $arr[0]); $this->assertEquals('Orange', $arr[1]); $this->assertEquals('Banana', $arr[2]); }