Beispiel #1
0
 /**
  * Test the taoService methods, the extensions loading
  * @see tao_models_classes_TaoService::getLoadedExtensions
  */
 public function testTaoServiceExtention()
 {
     foreach (MenuService::getAllPerspectives() as $perspective) {
         $this->assertTrue(strlen($perspective->getExtension()) > 0);
         $this->assertTrue(strlen($perspective->getId()) > 0);
         foreach ($perspective->getChildren() as $section) {
             $this->assertTrue(strlen($section->getName()) > 0);
             $this->assertTrue(strlen($section->getUrl()) > 0);
         }
     }
 }
 /**
  * returns the root classes to index
  * 
  * @return array
  */
 protected static function getIndexedClasses()
 {
     $classes = array();
     foreach (MenuService::getAllPerspectives() as $perspective) {
         foreach ($perspective->getChildren() as $structure) {
             foreach ($structure->getTrees() as $tree) {
                 if (!is_null($tree->get('rootNode'))) {
                     $classes[$tree->get('rootNode')] = new \core_kernel_classes_Class($tree->get('rootNode'));
                 }
             }
         }
     }
     return array_values($classes);
 }