From c2f5780008cabb4ee85b29e83357a41234085cae Mon Sep 17 00:00:00 2001 From: Patrick Barroca <pbarroca@afi-sa.fr> Date: Wed, 11 Jan 2017 17:59:43 +0100 Subject: [PATCH] dev #45275 fix failures --- .../ZendAfi/View/Helper/TreeViewFixtures.php | 59 ------------------- .../ZendAfi/View/Helper/TreeViewTest.php | 11 +--- 2 files changed, 3 insertions(+), 67 deletions(-) diff --git a/tests/library/ZendAfi/View/Helper/TreeViewFixtures.php b/tests/library/ZendAfi/View/Helper/TreeViewFixtures.php index e162317be74..01020bf3c09 100644 --- a/tests/library/ZendAfi/View/Helper/TreeViewFixtures.php +++ b/tests/library/ZendAfi/View/Helper/TreeViewFixtures.php @@ -20,65 +20,6 @@ */ class TreeViewFixtures { - /** @return array */ - public static function createItemActions() { - return array( - array( - 'url' => 'admin/cms/edit/id/%s', - 'icon' => 'ico/edit.gif', - 'label' => 'Modifier', - ), - array( - 'url' => 'admin/cms/delete/id/%s', - 'icon' => 'ico/del.gif', - 'label' => 'Supprimer', - ), - array( - 'url' => 'admin/cms/makeinvisible/id/%s', - 'icon' => 'ico/show.gif', - 'label' => 'Rendre cet article invisible', - 'condition' => 'isVisible' - ), - array( - 'url' => 'admin/cms/makevisible/id/%s', - 'icon' => 'ico/hide.gif', - 'label' => 'Rendre cet article visible', - 'condition' => 'isNotVisible' - ) - ); - } - - /** @return array */ - public static function createContainerActions() { - return array( - array( - 'url' => '/admin/cms/catedit/id/%s', - 'icon' => 'ico/edit.gif', - 'label' => 'Modifier' - ), - array( - 'url' => '/admin/cms/catdel/id/%s', - 'icon' => 'ico/del.gif', - 'label' => 'Supprimer', - 'condition' => 'hasNoChild', - 'anchorOptions' => array( - 'onclick' => 'return confirm("are you sure ?");' - ) - ), - array( - 'url' => '/admin/cms/add/id_cat/%s', - 'icon' => 'ico/add_news.gif', - 'label' => 'Ajouter un article', - ), - array( - 'url' => '/admin/cms-category/add/id/%s', - 'icon' => 'ico/add_cat.gif', - 'label' => 'Ajouter une sous-catégorie' - ), - ); - } - - /** @return array */ public static function createNestedCategoriesWithItems() { return array(array( diff --git a/tests/library/ZendAfi/View/Helper/TreeViewTest.php b/tests/library/ZendAfi/View/Helper/TreeViewTest.php index 3b80cfb5b62..e9c3541aeff 100644 --- a/tests/library/ZendAfi/View/Helper/TreeViewTest.php +++ b/tests/library/ZendAfi/View/Helper/TreeViewTest.php @@ -108,8 +108,7 @@ class TreeViewContainersWithoutItemsActionsTest extends TreeViewContainersTestCa 'parent_id' => 0]); $this->_html = $this->_helper->treeView( - TreeViewFixtures::createOneCategoryWithoutItems(), - TreeViewFixtures::createContainerActions() + TreeViewFixtures::createOneCategoryWithoutItems() ); } @@ -378,9 +377,7 @@ class TreeViewItemsActionsTest extends TreeViewItemsTestCase { parent::setUp(); $this->_html = $this->_helper->treeView( - TreeViewFixtures::createOneCategoryWithItems(), - array(), - TreeViewFixtures::createItemActions() + TreeViewFixtures::createOneCategoryWithItems() ); } @@ -484,9 +481,7 @@ extends TreeViewNestedContainersWithItemsTestCase { parent::setUp(); $this->_html = $this->_helper->treeView( - TreeViewFixtures::createNestedCategoriesWithItems(), - TreeViewFixtures::createContainerActions(), - TreeViewFixtures::createItemActions() + TreeViewFixtures::createNestedCategoriesWithItems() ); } -- GitLab