From e7850846d47d98c35acb38c1e0010e5fd94fd2ee Mon Sep 17 00:00:00 2001
From: efalcy <efalcy@afi-sa.fr>
Date: Tue, 30 May 2017 16:54:33 +0200
Subject: [PATCH] hotline #60846 add test

---
 .../controllers/WidgetControllerTest.php      | 27 +++++++++++++++++++
 1 file changed, 27 insertions(+)

diff --git a/tests/application/modules/admin/controllers/WidgetControllerTest.php b/tests/application/modules/admin/controllers/WidgetControllerTest.php
index 7770b20a551..e29a4801f23 100644
--- a/tests/application/modules/admin/controllers/WidgetControllerTest.php
+++ b/tests/application/modules/admin/controllers/WidgetControllerTest.php
@@ -55,6 +55,33 @@ abstract class WidgetControllerDispatchWidgetConfigurationTestCase extends Widge
 
 
 
+
+
+class WidgetControllerDispatchBanniereConfigurationTestCase extends WidgetControllerWidgetConfigurationTestCase {
+  public function setUp() {
+    parent::setUp();
+    $this->_profil
+      ->setParentId(null)
+      ->addBoiteOfTypeInBanniere('NEWS')
+      ->save();
+    $this->fixture('Class_Profil',
+                   ['id' => 6,
+                    'parent_id' => $this->_profil->getId()])
+         ->setParentProfil($this->_profil);
+
+    $this->dispatch('/admin/widget/edit-widget/id/'.current($this->_profil->getBoitesDivision(Class_Profil::DIV_BANNIERE))['preferences']['id_module'].'/id_profil/6', true);
+  }
+
+
+  /** @test **/
+  public function treeSelectShouldBeLoaded() {
+    $this->assertXPath('//script[contains(@src, "treeselect")]', $this->_response->getBody());
+  }
+
+}
+
+
+
 abstract class WidgetControllerPopupDispatchWidgetConfigurationTestCase extends WidgetControllerWidgetConfigurationTestCase {
 
   protected $_html;
-- 
GitLab