Permalink
Browse files

Move JFormFieldContentLanguage, JHtmlBatch, JHtmlCategory, JHtmlConte…

…ntLanguage and JHtmlMenu to legacy.
  • Loading branch information...
1 parent 4e9dbe3 commit 4d4ef432f1d69ed4e3a5daa4abc071eb51af2ac7 @realityking realityking committed Apr 15, 2012
@@ -54,6 +54,9 @@ class_exists('JLoader') or die;
JLoader::register('JText', JPATH_PLATFORM . '/joomla/language/text.php');
JLoader::register('JRoute', JPATH_PLATFORM . '/joomla/application/route.php');
+// Register the folder for the moved JHtml classes
+JHtml::addIncludePath(JPATH_PLATFORM . '/legacy/html');
+
// Register classes where the names have been changed to fit the autoloader rules
// @deprecated 12.3
JLoader::register('JDatabaseQueryMySQL', JPATH_PLATFORM . '/joomla/database/query/mysql.php');
@@ -25,8 +25,8 @@ class JFormFieldContentLanguageTest extends TestCaseDatabase
*/
protected function setUp()
{
- require_once JPATH_PLATFORM . '/joomla/form/fields/contentlanguage.php';
- include_once dirname(__DIR__) . '/inspectors.php';
+ require_once JPATH_PLATFORM . '/legacy/form/field/contentlanguage.php';
+ require_once JPATH_TESTS . '/suites/unit/joomla/form/inspectors.php';
}
/**
@@ -38,7 +38,7 @@ protected function setUp()
*/
protected function getDataSet()
{
- return $this->createXMLDataSet(__DIR__ . '/testfiles/JFormField.xml');
+ return $this->createXMLDataSet(JPATH_TESTS . '/suites/unit/joomla/form/fields/testfiles/JFormField.xml');
}
/**
@@ -47,6 +47,7 @@ protected function getDataSet()
* @return void
*
* @since 11.1
+ * @covers JFormFieldContentLanguage::getOptions
*/
public function testGetInput()
{
@@ -7,7 +7,7 @@
* @license GNU General Public License version 2 or later; see LICENSE
*/
-require_once JPATH_PLATFORM.'/joomla/html/html/batch.php';
+require_once JPATH_PLATFORM . '/legacy/html/batch.php';
/**
* Test class for JHtmlBatch.
@@ -44,7 +44,7 @@ protected function setUp()
*/
protected function getDataSet()
{
- return $this->createXMLDataSet(__DIR__.'/testfiles/JHtmlTest.xml');
+ return $this->createXMLDataSet(JPATH_TESTS . '/suites/unit/joomla/html/html/testfiles/JHtmlTest.xml');
}
/**
@@ -53,6 +53,7 @@ protected function getDataSet()
* @return void
*
* @since 11.3
+ * @covers JHtmlBatch::access
*/
public function testAccess()
{
@@ -68,6 +69,7 @@ public function testAccess()
* @return void
*
* @since 11.3
+ * @covers JHtmlBatch::item
*/
public function testItem()
{
@@ -83,6 +85,7 @@ public function testItem()
* @return void
*
* @since 11.3
+ * @covers JHtmlBatch::language
*/
public function testLanguage()
{
@@ -98,6 +101,7 @@ public function testLanguage()
* @return void
*
* @since 11.4
+ * @covers JHtmlBatch::user
*/
public function testUser()
{
@@ -7,7 +7,7 @@
* @license GNU General Public License version 2 or later; see LICENSE
*/
-require_once JPATH_PLATFORM.'/joomla/html/html/category.php';
+require_once JPATH_PLATFORM . '/legacy/html/category.php';
/**
* Test class for JHtmlCategory.
@@ -7,7 +7,7 @@
* @license GNU General Public License version 2 or later; see LICENSE
*/
-require_once JPATH_PLATFORM.'/joomla/html/html/menu.php';
+require_once JPATH_PLATFORM . '/legacy/html/menu.php';
/**
* Test class for JHtmlMenu.
@@ -46,7 +46,7 @@ protected function setUp()
*/
protected function getDataSet()
{
- return $this->createXMLDataSet(__DIR__.'/testfiles/JHtmlTest.xml');
+ return $this->createXMLDataSet(JPATH_TESTS . '/suites/unit/joomla/html/html/testfiles/JHtmlTest.xml');
}
/**
@@ -55,6 +55,7 @@ protected function getDataSet()
* @return void
*
* @since 11.3
+ * @covers JHtmlMenu::menus
*/
public function testMenus()
{
@@ -70,6 +71,7 @@ public function testMenus()
* @return void
*
* @since 11.3
+ * @covers JHtmlMenu::menuitems
*/
public function testMenuitems()
{

0 comments on commit 4d4ef43

Please sign in to comment.