/** * Test getter/setter for group */ public function testGetSetGroup() { $this->assertEquals(count($this->product->getGroups()), 0); // Change value and assert new $newGroup = new Group(); $this->product->addGroup($newGroup); $this->assertEquals($newGroup, $this->product->getGroups()->first()); $this->product->removeGroup($newGroup); $this->assertEmpty(count($this->product->getGroups()), 0); }
/** * {@inheritDoc} */ public function removeGroup(\Pim\Bundle\CatalogBundle\Model\GroupInterface $group) { $this->__initializer__ && $this->__initializer__->__invoke($this, 'removeGroup', array($group)); return parent::removeGroup($group); }