public function testFormatTreeMessage() { $root = new Tree\Node(); $admin = new Tree\Node(); $fabio = new Tree\Node(); $root->setPath('/Users'); $fabio->setPath('/Users/fabio'); $admin->setPath('/Users/admin'); // avoid recursion $parent = clone $root; $admin->setParent($parent); $fabio->setParent($parent); $root->addChildren($fabio); $root->addChildren($admin); $expected = $this->getProtoContent('tree.txt'); $actual = $root->__toString(); $this->assertEquals($expected, (string) $actual); }