Example #1
0
 /**
  * Test JViewLegacy::addTemplatePath()
  *
  * @since   11.3
  *
  * @return  void
  */
 public function testAddTemplatePath()
 {
     $ds = DIRECTORY_SEPARATOR;
     // Reset the internal _path property so we can track it more easily.
     TestReflection::setValue($this->class, '_path', array('helper' => array(), 'template' => array()));
     $this->class->addTemplatePath(JPATH_ROOT . $ds . 'libraries');
     $this->assertAttributeEquals(array('helper' => array(), 'template' => array(realpath(JPATH_ROOT . $ds . 'libraries') . $ds)), '_path', $this->class);
     $this->class->addTemplatePath(JPATH_ROOT . $ds . 'cache');
     $this->assertAttributeEquals(array('helper' => array(), 'template' => array(realpath(JPATH_ROOT . $ds . 'cache') . $ds, realpath(JPATH_ROOT . $ds . 'libraries') . $ds)), '_path', $this->class);
 }
Example #2
0
 /**
  * Adds a path to the template search path list
  *
  * @param string $path The path to add
  *
  * @return AppView The view itself to allow chaining
  *
  * @since 1.0.0
  */
 public function addTemplatePath($path)
 {
     parent::addTemplatePath($path);
     return $this;
 }