/** * Test getter/setter for translations property */ public function testTranslations() { $this->assertCount(0, $this->group->getTranslations()); // Change value and assert new $newTranslation = new GroupTranslation(); $this->assertEntity($this->group->addTranslation($newTranslation)); $this->assertCount(1, $this->group->getTranslations()); $this->assertInstanceOf('Pim\\Bundle\\CatalogBundle\\Entity\\GroupTranslation', $this->group->getTranslations()->first()); $this->group->addTranslation($newTranslation); $this->assertCount(1, $this->group->getTranslations()); $this->assertEntity($this->group->removeTranslation($newTranslation)); $this->assertCount(0, $this->group->getTranslations()); }
/** * {@inheritDoc} */ public function removeTranslation(\Pim\Bundle\TranslationBundle\Entity\AbstractTranslation $translation) { $this->__initializer__ && $this->__initializer__->__invoke($this, 'removeTranslation', array($translation)); return parent::removeTranslation($translation); }