PopTest\Nav\NavTest::testAddLeaf PHP Метод

testAddLeaf() публичный Метод

public testAddLeaf ( )
    public function testAddLeaf()
    {
        $_SERVER['REQUEST_URI'] = '/first';
        $tree = array(array('name' => 'First Nav Item', 'href' => '/first'), array('name' => 'Second Nav Item', 'href' => '/second'));
        $n = new Nav($tree);
        $n->addLeaf('Second Nav Item', array('name' => 'A Brand New Child', 'href' => 'a-brand-new-child'));
        $navString = <<<NAV
        <a href="/second">Second Nav Item</a>
        <ul>
            <li>
                <a href="/second/a-brand-new-child">A Brand New Child</a>
            </li>
        </ul>
NAV;
        $this->assertContains($navString, (string) $n);
    }