public function testCanCreateEntity() { $groupKey = $this->generateRandomString(5); $group = new Group(); $group->setKey($groupKey); $group->setName('testGroup'); $group->setTax(true); $group->setTaxInput(true); $group->setMode(1); $anotherGroup = new Group(); $anotherGroup->setKey($this->generateRandomString(5)); $anotherGroup->setName('testGroup'); $anotherGroup->setTax(true); $anotherGroup->setTaxInput(true); $anotherGroup->setMode(1); $customer = new Customer(); $customer->setEmail('*****@*****.**'); $customer->setGroup($group); $this->em->persist($customer); $this->em->persist($group); $this->em->persist($anotherGroup); $this->em->flush(); $this->em->clear(); $this->assertNotEmpty($customer->getId()); $this->assertNotEmpty($customer->getGroup()->getId()); return $customer; }
/** * {@inheritDoc} */ public function setTax($tax) { $this->__initializer__ && $this->__initializer__->__invoke($this, 'setTax', array($tax)); return parent::setTax($tax); }