function testResolveIncludePathDir()
 {
     $_ = $this->_rnd();
     mkdir(LIMB_VAR_DIR . '/tmp/' . $_);
     $resolved = lmb_resolve_include_path($_);
     $this->assertEqual(realpath($resolved), realpath(LIMB_VAR_DIR . '/tmp/' . $_));
     rmdir(LIMB_VAR_DIR . '/tmp/' . $_);
 }
 function locateSourceTemplate($file_name)
 {
     if (lmb_is_path_absolute($file_name)) {
         return $file_name;
     }
     $dirs = $this->config->tpl_scan_dirs;
     foreach ($dirs as $dir) {
         $file_path = $dir . '/' . $file_name;
         if (lmb_is_path_absolute($file_path) && file_exists($file_path)) {
             return $file_path;
         }
         if ($full_path = lmb_resolve_include_path($file_path)) {
             return $full_path;
         }
     }
     throw new lmbMacroException('template file not found', array('template' => $file_path));
 }