示例#1
0
 /**
  * @Given existen las asambleas:
  */
 public function thereAreConventions(TableNode $tableNode)
 {
     foreach ($tableNode->getHash() as $conventionHash) {
         $convention = new Convention();
         $convention->setName($conventionHash['nombre']);
         $convention->setStartsAt(new \DateTime($conventionHash['fechaInicio']));
         $convention->setEndsAt(new \DateTime($conventionHash['fechaFin']));
         $convention->setDomain($conventionHash['dominio']);
         $convention->setEmail($this->faker->email);
         $this->getEntityManager()->persist($convention);
     }
     $this->getEntityManager()->flush();
 }