コード例 #1
0
 /**
  * {@inheritDoc}
  */
 public function setName($name)
 {
     $this->__initializer__ && $this->__initializer__->__invoke($this, 'setName', array($name));
     return parent::setName($name);
 }
コード例 #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());
 }