public function testRenderEncodedAttributes()
 {
     $menu = new MenuItem('test', new MenuFactory());
     $menu->setChildrenAttributes(array('title' => 'encode " me >'));
     $menu->addChild('c1');
     $rendered = '<ul title="encode &quot; me &gt;"><li class="first last"><span>c1</span></li></ul>';
     $this->assertEquals($rendered, $this->renderer->render($menu));
 }
    public function testPrettyRendering()
    {
        $menu = new MenuItem('Root li', new MenuFactory());
        $menu->setChildrenAttributes(array('class' => 'root'));
        $menu->addChild('Parent 1');
        $menu->addChild('Parent 2');
        $renderer = new ListRenderer();
        $rendered = <<<HTML
<ul class="root">
  <li class="first">
    <span>Parent 1</span>
  </li>
  <li class="last">
    <span>Parent 2</span>
  </li>
</ul>

HTML;
        $this->assertEquals($rendered, $renderer->render($menu));
    }