Example #1
0
 public function testConstructDefault()
 {
     $item = new Item('foobar', 'foobar/');
     $this->assertTrue($item instanceof Item);
     $this->assertEquals('Foobar', $item->getText());
     $this->assertEquals('foobar/', $item->getHref());
 }
Example #2
0
 /**
  * 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);
 }