public function testConstructDefault() { $item = new Item('foobar', 'foobar/'); $this->assertTrue($item instanceof Item); $this->assertEquals('Foobar', $item->getText()); $this->assertEquals('foobar/', $item->getHref()); }
/** * Get child folders from specified root * * @return array */ protected function getChildren() { // If the root is the home, don't return any children if ($this->_rootItem && $this->_rootItem->getHref() == '/') { return array(); } $rootPath = $this->getRootPath(); return glob(rtrim($rootPath, DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR . '*', GLOB_ONLYDIR); }