/**
  * Test the JParameter::addElementPath method.
  */
 public function testAddElementPath()
 {
     $p = new JParameterInspector('');
     $p->addElementPath(dirname(__FILE__));
     $expected = array(dirname(__FILE__) . DS, JPATH_LIBRARIES . DS . 'joomla' . DS . 'html/parameter/element');
     $this->assertThat($p->getElementPath(), $this->equalTo($expected));
 }
Exemple #2
0
	/**
	 * Test the JParameter::addElementPath method.
	 */
	public function testAddElementPath()
	{
		$p = new JParameterInspector('');
		$p->addElementPath(dirname(__FILE__));

		$expected = array(
			// addElementPath appends the slash for some reason.
			dirname(__FILE__) . '/',
			JPATH_LIBRARIES . '/joomla/html/parameter/element'
		);

		$this->assertThat(
			$p->getElementPath(),
			$this->equalTo($expected)
		);
	}
Exemple #3
0
 /**
  * Test the JParameter::addElementPath method.
  *
  * @return  void
  *
  * @since   11.1
  */
 public function testAddElementPath()
 {
     $p = new JParameterInspector('');
     $p->addElementPath(str_replace('\\', '/', __DIR__));
     $this->assertThat($p->getElementPath(), $this->equalTo(array(str_replace('\\', '/', __DIR__ . '/'), str_replace('\\', '/', JPATH_PLATFORM . '/joomla/html/parameter/element'))));
 }