/** * Test JController::addViewPath * * @covers JController::addViewPath */ public function testAddViewPath() { $this->class->addViewPath(JPATH_ROOT . '/views'); $paths = TestReflection::getValue($this->class, 'paths'); $this->assertTrue(is_array($paths['view']), 'The path type should be an array.'); $this->assertThat(str_replace(DIRECTORY_SEPARATOR, '/', $paths['view'][0]), $this->equalTo(str_replace(DIRECTORY_SEPARATOR, '/', JPATH_ROOT . '/views/')), 'Line:' . __LINE__ . ' The path type should be present, clean and with a trailing slash.'); }