From 039cae8b323e597a66312f029cbbefd2e07b61ba Mon Sep 17 00:00:00 2001 From: pbarroca <pbarroca@afi-sa.fr> Date: Wed, 4 Apr 2018 15:45:16 +0200 Subject: [PATCH] hotline #72999 : fix RT --- .../View/Helper/Accueil/LibraryTest.php | 28 +++++++++++-------- 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/tests/library/ZendAfi/View/Helper/Accueil/LibraryTest.php b/tests/library/ZendAfi/View/Helper/Accueil/LibraryTest.php index ef941231249..d9972e11d63 100644 --- a/tests/library/ZendAfi/View/Helper/Accueil/LibraryTest.php +++ b/tests/library/ZendAfi/View/Helper/Accueil/LibraryTest.php @@ -73,11 +73,10 @@ abstract class ZendAfi_View_Helper_Accueil_LibraryTestCase extends ViewHelperTes 'division' => 2, 'preferences' => $preferences]; - $view = new ZendAfi_Controller_Action_Helper_View(); - $view->setScriptPath('application/modules/opac/views/scripts'); + $this->view->setScriptPath('application/modules/opac/views/scripts'); $this->_helper = new ZendAfi_View_Helper_Accueil_Library(2, $params); - $this->_helper->setView($view); + $this->_helper->setView($this->view); $this->html = $this->_helper->getBoite(); } @@ -200,16 +199,18 @@ class ZendAfi_View_Helper_Accueil_LibraryAlphaOrderDisplayTest extends ZendAfi_V -class ZendAfi_View_Helper_Accueil_LibrarySelectionOrderDisplayTest extends ZendAfi_View_Helper_Accueil_LibraryTestCase { +class ZendAfi_View_Helper_Accueil_LibrarySelectionOrderDisplayTest + extends ZendAfi_View_Helper_Accueil_LibraryTestCase { + public function setUp() { parent::setUp(); - Storm_Test_ObjectWrapper::onLoaderOfModel('Class_Bib') - ->whenCalled('findAllBy') - ->with(['id_site' => ['4', '1', '2'], - 'order' => 'FIELD (id_site, 4,1,2)']) - ->answers([$this->meythet, $this->annecy, $this->cran]) - ->beStrict(); + $this->onLoaderOfModel('Class_Bib') + ->whenCalled('findAllBy') + ->with(['id_site' => ['4', '1', '2'], + 'order' => 'FIELD (id_site, 4,1,2)']) + ->answers([$this->meythet, $this->annecy, $this->cran]) + ->beStrict(); $this->_generateLibrary(['titre' => 'Bibliotheques', 'libraries' => '4;1;2', @@ -286,7 +287,8 @@ class ZendAfi_View_Helper_Accueil_LibraryFieldsDisplayTest extends ZendAfi_View_ -class ZendAfi_View_Helper_Accueil_LibraryCustomFieldsDisplayTest extends ZendAfi_View_Helper_Accueil_LibraryTestCase { +class ZendAfi_View_Helper_Accueil_LibraryCustomFieldsDisplayTest + extends ZendAfi_View_Helper_Accueil_LibraryTestCase { public function setUp() { parent::setUp(); @@ -369,7 +371,9 @@ class ZendAfi_View_Helper_Accueil_LibraryCustomFieldsDisplayTest extends ZendAfi -class ZendAfi_View_Helper_Accueil_LibraryPaginatorTest extends ZendAfi_View_Helper_Accueil_LibraryTestCase { +class ZendAfi_View_Helper_Accueil_LibraryPaginatorTest + extends ZendAfi_View_Helper_Accueil_LibraryTestCase { + public function setUp() { parent::setUp(); $this->_generateLibrary(['titre' => 'Bibliotheques', -- GitLab