Skip to content
Snippets Groups Projects
Commit 39b3cac2 authored by llaffont's avatar llaffont
Browse files

Le chargement des scripts pour la config des visu. boîte bib numérique passe par ScriptLoader

parent 63b32593
No related merge requests found
......@@ -41,14 +41,9 @@ class ZendAfi_View_Helper_Admin_ImageViewersOptions extends ZendAfi_View_Helper_
* @return string
*/
public function imageViewersOptions($preferences) {
$this->_preferences = $preferences;
$this->view->headScript()
->appendFile(JQUERY)
->appendFile(JQUERYUI);
$this->view->headLink()
->appendStylesheet(URL_ADMIN_JS.'jquery_ui/css/jquery-ui.custom.smoothness.min.css');
Class_ScriptLoader::getInstance()->loadJQueryUI();
$this->_preferences = $preferences;
$html = $this->_getComboStyles();
......
......@@ -30,6 +30,8 @@ abstract class ImageViewersOptionsTestCase extends ViewHelperTestCase {
public function setUp() {
parent::setUp();
Class_ScriptLoader::resetInstance();
$this->_helper = new ZendAfi_View_Helper_Admin_ImageViewersOptions;
$this->_helper->setView(new ZendAfi_Controller_Action_Helper_View());
......@@ -47,7 +49,8 @@ abstract class ImageViewersOptionsTestCase extends ViewHelperTestCase {
class ImageViewersOptionsBasicTest extends ImageViewersOptionsTestCase {
/** @test */
public function htmlShouldIncludeScriptsLinks() {
$this->assertXPath($this->_html, '//script[contains("jquery", @src)]');
$this->assertXPath(Class_ScriptLoader::getInstance()->html(),
'//script[contains("jquery", @src)]');
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment