Exemple #1
0
 /**
  * @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;
 }
Exemple #2
0
 /**
  * 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;
 }