Skip to content

Commit

Permalink
fixed js name
Browse files Browse the repository at this point in the history
  • Loading branch information
Dennis Patzer committed Mar 21, 2018
1 parent 91120e4 commit 1b5aa03
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 34 deletions.
22 changes: 11 additions & 11 deletions src/Manager/ListManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -115,18 +115,18 @@ public function __construct(
FormUtil $formUtil,
\Twig_Environment $twig
) {
$this->framework = $framework;
$this->listConfigRegistry = $listConfigRegistry;
$this->framework = $framework;
$this->listConfigRegistry = $listConfigRegistry;
$this->listConfigElementRegistry = $listConfigElementRegistry;
$this->filterManager = $filterManager;
$this->request = $request;
$this->modelUtil = $modelUtil;
$this->urlUtil = $urlUtil;
$this->formUtil = $formUtil;
$this->containerUtil = $containerUtil;
$this->imageUtil = $imageUtil;
$this->twig = $twig;
$this->database = $framework->createInstance(Database::class);
$this->filterManager = $filterManager;
$this->request = $request;
$this->modelUtil = $modelUtil;
$this->urlUtil = $urlUtil;
$this->formUtil = $formUtil;
$this->containerUtil = $containerUtil;
$this->imageUtil = $imageUtil;
$this->twig = $twig;
$this->database = $framework->createInstance(Database::class);
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/Resources/contao/config/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
*/
if (System::getContainer()->get('huh.utils.container')->isFrontend())
{
$GLOBALS['TL_JAVASCRIPT']['list-bundle'] = 'bundles/heimrichhannotcontaolist/js/jquery.list-bundle.min.js|static';
$GLOBALS['TL_JAVASCRIPT']['contao-list-bundle'] = 'bundles/heimrichhannotcontaolist/js/jquery.list-bundle.min.js|static';
$GLOBALS['TL_JAVASCRIPT']['huh_components_masonry'] = 'assets/masonry/dist/masonry.pkgd.min.js|static';
$GLOBALS['TL_JAVASCRIPT']['huh_components_imagesloaded'] = 'assets/imagesloaded/dist/imagesloaded.pkgd.min.js|static';
$GLOBALS['TL_JAVASCRIPT']['huh_components_jscroll'] = 'assets/jscroll/dist/jquery.jscroll.min.js|static';
Expand Down
44 changes: 22 additions & 22 deletions tests/Module/ModuleListTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,24 +52,24 @@ public function setUp()
\define('TL_ROOT', $this->getFixturesDir());
}

$objPage = $this->getMockBuilder(PageModel::class)->disableOriginalConstructor()->getMock();
$objPage = $this->getMockBuilder(PageModel::class)->disableOriginalConstructor()->getMock();
$objPage->outputFormat = '';

$GLOBALS['TL_LANGUAGE'] = 'de';
$GLOBALS['objPage'] = $objPage;
$GLOBALS['TL_DCA']['tl_list_config']['fields']['abc']['eval']['addAsDataAttribute'] = true;
$GLOBALS['TL_DCA']['tl_list_config']['fields']['fieldWithData']['eval']['addAsDataAttribute'] = true;
$GLOBALS['TL_LANGUAGE'] = 'de';
$GLOBALS['objPage'] = $objPage;
$GLOBALS['TL_DCA']['tl_list_config']['fields']['abc']['eval']['addAsDataAttribute'] = true;
$GLOBALS['TL_DCA']['tl_list_config']['fields']['fieldWithData']['eval']['addAsDataAttribute'] = true;
$GLOBALS['TL_DCA']['tl_list_config']['fields']['fieldWithoutData']['eval']['addAsDataAttribute'] = false;

$router = $this->createRouterMock();
$router = $this->createRouterMock();
$requestStack = $this->createRequestStackMock();
$framework = $this->mockContaoFramework($this->createMockAdapater());
$framework = $this->mockContaoFramework($this->createMockAdapater());

$config = $this->createMock(Config::class);
$config = $this->createMock(Config::class);
$database = $this->createMock(Connection::class);

$finder = new ResourceFinder([
$this->getFixturesDir() . '/vendor/contao/core-bundle/Resources/contao',
$this->getFixturesDir().'/vendor/contao/core-bundle/Resources/contao',
]);

$container = $this->mockContainer();
Expand Down Expand Up @@ -99,10 +99,10 @@ public function setUp()
'managers' => [
[
'name' => 'default',
'id' => 'huh.list.manager.list',
]
]
]
'id' => 'huh.list.manager.list',
],
],
],
]);
$container->set('huh.utils.model', new ModelUtil($framework));
$container->set('huh.filter.manager', $this->createFilterManager());
Expand Down Expand Up @@ -148,11 +148,11 @@ public function skip_testGenerate()
TemplateLoader::addFiles(['mod_list' => '../src/Resources/contao/templates']);

$moduleModelConfig = [
'id' => 1,
'id' => 1,
'listConfig' => 5,
'cssID' => [0 => 'phpunit', 1 => 'test'],
'cssID' => [0 => 'phpunit', 1 => 'test'],
];
$moduleModel = $this->getMockBuilder(ModuleModel::class)->disableOriginalConstructor()->setMethods(['row'])->getMock();
$moduleModel = $this->getMockBuilder(ModuleModel::class)->disableOriginalConstructor()->setMethods(['row'])->getMock();
$moduleModel->method('row')->willReturn($moduleModelConfig);
foreach ($moduleModelConfig as $key => $value) {
$moduleModel->$key = $value;
Expand All @@ -170,7 +170,7 @@ public function createRouterMock()
$count = 0;
foreach ($params as $key => $value) {
$url .= (0 === $count ? '?' : '&');
$url .= $key . '=' . $value;
$url .= $key.'='.$value;
++$count;
}
}
Expand All @@ -184,7 +184,7 @@ public function createRouterMock()
public function createRequestStackMock()
{
$requestStack = new RequestStack();
$request = new Request();
$request = new Request();
$request->attributes->set('_contao_referer_id', 'foobar');
$requestStack->push($request);

Expand All @@ -205,7 +205,7 @@ public function createMockAdapater()
public function createListConfigRegistry()
{
$listModelData = [
'id' => 5,
'id' => 5,
'filter' => 3,
];

Expand All @@ -215,7 +215,7 @@ public function createListConfigRegistry()
$listRegistryModel->filter = 3;

$listRegistry = $this->createConfiguredMock(ListConfigRegistry::class, [
'findByPk' => $listRegistryModel,
'findByPk' => $listRegistryModel,
'computeListConfig' => $listRegistryModel,
]);

Expand All @@ -233,7 +233,7 @@ public function createFilterManager()
$filterManagerConfig = [
'findById' => $filterConfig,
];
$filterManager = $this->createConfiguredMock(FilterManager::class, $filterManagerConfig);
$filterManager = $this->createConfiguredMock(FilterManager::class, $filterManagerConfig);

return $filterManager;
}
Expand All @@ -243,7 +243,7 @@ public function createFilterManager()
*/
protected function getFixturesDir(): string
{
return __DIR__ . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'Fixtures';
return __DIR__.DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'Fixtures';
}

/**
Expand Down

0 comments on commit 1b5aa03

Please sign in to comment.