コード例 #1
0
ファイル: PMA_Theme_test.php プロジェクト: bugyak/phporadmin
 /**
  * @expectedException PHPUnit_Framework_Error
  */
 public function testCheckImgPathGlobalsWrongPath()
 {
     $prevThemePath = $GLOBALS['cfg']['ThemePath'];
     $GLOBALS['cfg']['ThemePath'] = 'no_themes';
     $this->object->setPath('/this/is/wrong/path');
     $this->object->checkImgPath();
     $GLOBALS['cfg']['ThemePath'] = $prevThemePath;
 }
コード例 #2
0
ファイル: Theme.class.php プロジェクト: tmhaoge/moped
 /**
  * returns theme object loaded from given folder
  * or false if theme is invalid
  *
  * @static
  * @param   string  path to theme
  * @return  object  PMA_Theme
  */
 function load($folder)
 {
     $theme = new PMA_Theme();
     $theme->setPath($folder);
     if (!$theme->loadInfo()) {
         return false;
     }
     $theme->checkImgPath();
     return $theme;
 }