public function testAdd() { $group = new EmbeddedGroup('Model\\Comment'); $group->setRootAndPath($article = $this->mandango->create('Model\\Article'), 'comments'); $comment = $this->mandango->create('Model\\Comment'); $group->add($comment); $this->assertSame(array('root' => $article, 'path' => 'comments._add0'), $comment->getRootAndPath()); }
public function testAdd() { $group = new EmbeddedGroup('Model\\Comment'); $group->setRootAndPath($article = $this->mandango->create('Model\\Article'), 'comments'); $comment = $this->mandango->create('Model\\Comment'); $group->add($comment); $this->assertEquals($article, $comment->_root); $this->assertEquals('comments._add0', $comment->_path); }