public function testComposite() { $root = new Composite(); $root->doSomething(); $branch = new Composite(); $leaf = new Leaf(); $root->add($branch); $branch->add($leaf); $this->display($root); }