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()); }
/** * 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; }