checks image path for existence - if not found use img from fallback theme
public checkImgPath ( ) : boolean | ||
리턴 | boolean |
/** * Test for Theme::checkImgPath * * @return void * @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; }
/** * Test for Theme::checkImgPath * * @return void */ public function testCheckImgPath() { $this->object->setPath('./themes/original'); $this->assertTrue($this->object->checkImgPath()); }
/** * returns theme object loaded from given folder * or false if theme is invalid * * @param string $folder path to theme * * @return Theme|false * @static * @access public */ public static function load($folder) { $theme = new Theme(); $theme->setPath($folder); if (!$theme->loadInfo()) { return false; } $theme->checkImgPath(); return $theme; }