/** * Tests the JApplicationSite::setTemplate method. * * @return void * * @since 3.2 */ public function testSetTemplate() { $this->class->setTemplate('beez3'); $template = $this->class->getTemplate(true); $this->assertThat($template->params, $this->isInstanceOf('JRegistry')); $this->assertThat($template->template, $this->equalTo('beez3')); }
/** * Tests the JApplicationSite::setTemplate method. * * @return void * * @since 3.2 */ public function testSetTemplate() { $this->class->setTemplate('beez3'); $template = $this->class->getTemplate(true); $this->assertInstanceOf('\\Joomla\\Registry\\Registry', $template->params); $this->assertEquals('beez3', $template->template); }
/** * Init internal vars */ private function __construct() { // get links to global vars $this->doc = JFactory::getDocument(); $this->config = JFactory::getConfig(); $this->url = JUri::getInstance(); $this->app = JFactory::getApplication(); $this->menu = $this->app->getMenu(); $this->params = $this->app->getTemplate(true)->params; $this->user = JFactory::getUser(); $this->baseurl = $this->_getBaseUrl(); // relative paths $this->path = $this->_getTemplatePath(); $this->img = $this->path . '/images'; $this->less = $this->path . '/less'; $this->scss = $this->path . '/scss'; $this->css = $this->path . '/css'; $this->js = $this->path . '/js'; // absolute paths $this->pathFull = $this->_getTemplatePathFull(); $this->imgFull = JPath::clean($this->pathFull . '/images'); $this->cssFull = JPath::clean($this->pathFull . '/css'); $this->lessFull = JPath::clean($this->pathFull . '/less'); $this->scssFull = JPath::clean($this->pathFull . '/scss'); $this->jsFull = JPath::clean($this->pathFull . '/js'); $this->partial = JPath::clean($this->pathFull . '/partial'); // init template vars $this->lang = $this->_getLangCurrent(); $this->langDef = $this->_getLangDefault(); $this->request = $this->_getRequest(); $this->dir = $this->doc->getDirection(); // init mobile detect $this->mobile = $this->_getMobile(); }