Beispiel #1
0
 /**
  * @Given there are Composite identifier objects
  */
 public function thereIsACompositeIdentifierObject()
 {
     $item = new CompositeItem();
     $item->setField1('foobar');
     $this->manager->persist($item);
     for ($i = 0; $i < 4; ++$i) {
         $label = new CompositeLabel();
         $label->setValue('foo-' . $i);
         $rel = new CompositeRelation();
         $rel->setCompositeLabel($label);
         $rel->setCompositeItem($item);
         $rel->setValue('somefoobardummy');
         $this->manager->persist($label);
         $this->manager->persist($rel);
     }
     $this->manager->flush();
 }