示例#1
0
 public function testChildren()
 {
     $frame = new Frame();
     $firstChild = new Audio();
     $secondChild = new Audio();
     $this->assertEmpty($frame->getChildren());
     $this->assertSame($frame, $frame->addChild($firstChild));
     $this->assertEquals(array($firstChild), $frame->getChildren());
     $this->assertSame($frame, $frame->addChildren(array($firstChild, $secondChild)));
     $this->assertEquals(array($firstChild, $secondChild), $frame->getChildren());
     $this->assertSame($frame, $frame->removeAllChildren());
     $this->assertEmpty($frame->getChildren());
 }