diff --git a/tests/library/ZendAfi/View/Helper/Accueil/LibraryTest.php b/tests/library/ZendAfi/View/Helper/Accueil/LibraryTest.php index ef9412312498537398c0646bf31f98cf75c04e98..d9972e11d634617f73df06825b171f2dc9c1f0c7 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',