private function createOrder(Client $client, $identifier) { $em = $this->getEntityManager($client); $order = new Order(); $order->setFullname(ucfirst($identifier))->setEmail($identifier . '@example.org')->setPhone('0123456789')->setDate('Some date')->setOrder(array('rows' => array(array('meal' => 'Meal ' . $identifier, 'unit_price' => array('3.00', 'EUR'), 'quantity' => 3, 'price' => array('9.00', 'EUR'))), 'total_count' => 3, 'total_price' => array('9.00', 'EUR'))); $em->persist($order); $em->flush(); }