コード例 #1
0
ファイル: PMA_Theme_test.php プロジェクト: bugyak/phporadmin
 public function testLoadInfo()
 {
     $this->object->setPath('./themes/original');
     $this->assertTrue($this->object->loadInfo());
     $this->assertEquals(filemtime($this->object->getPath() . '/info.inc.php'), $this->object->mtime_info);
     $this->object->setPath('./themes/original');
     $this->object->mtime_info = filemtime($this->object->getPath() . '/info.inc.php');
     $this->assertTrue($this->object->loadInfo());
     $this->assertEquals('Original', $this->object->getName());
 }
コード例 #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;
 }