/** * Test getter/setter for group property * * TODO : Test with null */ public function testGetSetGroup() { $this->assertNull($this->attribute->getGroup()); $attributeGroup = new AttributeGroup(); $this->assertEntity($this->attribute->setGroup($attributeGroup)); $this->assertInstanceOf('Pim\\Bundle\\CatalogBundle\\Entity\\AttributeGroup', $this->attribute->getGroup()); $this->assertEquals($attributeGroup, $this->attribute->getGroup()); }
/** * Add attributes * * @param AbstractAttribute $attribute * * @return AttributeGroup */ public function addAttribute(AbstractAttribute $attribute) { $this->attributes[] = $attribute; $attribute->setGroup($this); return $this; }