/**
  * {@inheritDoc}
  */
 public function setAttribute($attribute)
 {
     $this->__initializer__ && $this->__initializer__->__invoke($this, 'setAttribute', array($attribute));
     return parent::setAttribute($attribute);
 }
Ejemplo n.º 2
0
 public function testCanRemoveOneToOne()
 {
     $article = new Article();
     $article->setName('Dummy');
     $attribute = new \Shopware\Models\Attribute\Article();
     $attribute->setAttr1('foo');
     $article->setAttribute($attribute);
     $attribute->setArticle($article);
     $data = array('attribute' => null);
     $article->fromArray($data);
     $this->assertNull($article->getAttribute());
     $this->assertNull($attribute->getArticle());
 }