Removed some bugs in abstract class, added testcase

This commit is contained in:
2019-05-22 15:26:24 +02:00
parent b3e28d7884
commit b868f0fe86
5 changed files with 103 additions and 8 deletions

View File

@@ -0,0 +1,35 @@
<?php
use Joomla\CMS\Toolbar\ToolbarHelper;
use Joomla\CMS\MVC\View\HtmlView;
// No direct access.
defined('_JEXEC') or die;
JLoader::register("ClubsControllerClub", JPATH_ROOT . "/administrator/components/com_clubs/controllers/club.php");
class ClubsViewTest extends HtmlView
{
function display($tpl = null)
{
ToolbarHelper::title('Test');
$factory = new CommonClubsModelFactoryClub();
$this->clubs = $factory->loadElements();
$this->club = $this->clubs[0];
parent::display($tpl);
}
protected function getViewName()
{
return 'club';
}
protected function getElementController()
{
return new ClubsControllerClub();
}
}