Ejemplo n.º 1
0
 public function testChildren()
 {
     $frameModel = new FrameModel();
     $firstChild = new Including();
     $secondChild = new Including();
     $this->assertEmpty($frameModel->getChildren());
     $this->assertSame($frameModel->addChild($firstChild), $frameModel);
     $this->assertEquals($frameModel->getChildren(), array($firstChild));
     $this->assertSame($frameModel->addChildren(array($firstChild, $secondChild)), $frameModel);
     $this->assertEquals($frameModel->getChildren(), array($firstChild, $secondChild));
     $this->assertSame($frameModel->removeAllChildren(), $frameModel);
     $this->assertEmpty($frameModel->getChildren());
 }