public function testClear() { $col = new PropelCollection(); $col->clear(); $this->assertEquals(array(), $col->getData(), 'clear() empties the collection'); $data = array('bar1', 'bar2', 'bar3'); $col = new PropelCollection($data); $col->clear(); $this->assertEquals(array(), $col->getData(), 'clear() empties the collection'); }
public function serializeCollection(VisitorInterface $visitor, \PropelCollection $collection, Type $type, Context $context) { return $visitor->visitArray($collection->getData(), $type, $context); }