public function createCustomerGroup($data = array()) { $data = array_merge(array('key' => 'PHP', 'name' => 'Unit test', 'tax' => true, 'taxInput' => true, 'mode' => false, 'discount' => 0), $data); $this->deleteCustomerGroup($data['key']); $customer = new Models\Customer\Group(); $customer->fromArray($data); $this->entityManager->persist($customer); $this->entityManager->flush($customer); $this->entityManager->clear(); $this->createdCustomerGroups[] = $customer->getKey(); return $customer; }
/** * {@inheritDoc} */ public function fromArray(array $array = array()) { $this->__initializer__ && $this->__initializer__->__invoke($this, 'fromArray', array($array)); return parent::fromArray($array); }