public function arrayElementsAreMappedToCollectionAsscociationFields()
{
$this->factory->defineEntity('SpaceShip');
$this->factory->defineEntity('Person', array('spaceShip' => FieldDef::reference('SpaceShip')));
$p1 = $this->factory->get('Person');
$p2 = $this->factory->get('Person');
$ship = $this->factory->get('SpaceShip', array('name' => 'Battlestar Galaxy', 'crew' => array($p1, $p2)));
$this->assertTrue($ship->getCrew() instanceof ArrayCollection);
$this->assertTrue($ship->getCrew()->contains($p1));
$this->assertTrue($ship->getCrew()->contains($p2));
}