示例#1
0
 /**
  * Test JView::addHelperPath()
  *
  * @since 11.3
  */
 public function testAddHelperPath()
 {
     $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->addHelperPath(JPATH_ROOT . '/libraries');
     $this->assertAttributeEquals(array('helper' => array(realpath(JPATH_ROOT . '/libraries') . $ds), 'template' => array()), '_path', $this->class);
     $this->class->addHelperPath(JPATH_ROOT . '/cache');
     $this->assertAttributeEquals(array('helper' => array(realpath(JPATH_ROOT . '/cache') . $ds, realpath(JPATH_ROOT . '/libraries') . $ds), 'template' => array()), '_path', $this->class);
 }