/** * @covers CollectionType\Collection\CollectionAbstract::toArray */ public function testToArrayForSomeValues() { $this->collection->add('A'); $this->collection->add('B'); $this->collection->add('C'); $result = $this->collection->toArray(); $this->assertEquals(['A', 'B', 'C'], $result); }
/** * @covers CollectionType\Collection\CollectionAbstract::toArray */ public function testToArrayForSomeValues() { $a = new \stdClass(); $a->param = 'A'; $b = new \stdClass(); $b->param = 'B'; $c = new \stdClass(); $c->param = 'C'; $this->collection->add($a); $this->collection->add($b); $this->collection->add($c); $result = $this->collection->toArray(); $this->assertEquals([$a, $b, $c], $result); }