diff --git a/library/ZendAfi/View/Helper/Notice/Exemplaires.php b/library/ZendAfi/View/Helper/Notice/Exemplaires.php index 3cd46d0567a4e3eafe755474c1dba3ab1f44668e..1ecdb1dd6c0fe90cf07d0ca3f91ee4e95df401d2 100644 --- a/library/ZendAfi/View/Helper/Notice/Exemplaires.php +++ b/library/ZendAfi/View/Helper/Notice/Exemplaires.php @@ -30,13 +30,11 @@ class ZendAfi_View_Helper_Notice_Exemplaires extends Zend_View_Helper_HtmlElemen $preferences = $this->preferences["exemplaires"]; // Recup des donnees de dispo et reservable - $cls_comm = null; - xdebug_break(); -// if ($preferences["grouper"] == 1) { + if ($preferences["grouper"] == 1) { $cls_comm = new Class_CommSigb(); $exemplaires = $cls_comm->getDispoExemplaires($exemplaires); -// } + } $cote_libelle = $this->_('Cote').$this->editionLabelle($exemplaires); diff --git a/tests/application/modules/admin/controllers/BibControllerTest.php b/tests/application/modules/admin/controllers/BibControllerTest.php index 356bdb16c78de061e660c7970318f418bb9d6b13..d5448b98c83f08dc9611b6c169a9f50f4b31b8a7 100644 --- a/tests/application/modules/admin/controllers/BibControllerTest.php +++ b/tests/application/modules/admin/controllers/BibControllerTest.php @@ -829,20 +829,21 @@ class BibControllerAjaxImagePlanTest extends BibControllerTestCase { parent::setUp(); $file_system = Storm_Test_ObjectWrapper::mock() ->whenCalled('file_exists') - ->with(ROOT_PATH . '/userfiles/photobib/plans/bib_3_plan_3.png') + ->with(ROOT_PATH . 'userfiles/photobib/plans/bib_3_plan_3.png') ->answers(true) + ->whenCalled('rename') ->answers(true); Class_Plan::setFileSystem($file_system); - $plan=$this->fixture('Class_Plan', - ['id'=> 3, - 'bib' => $this->bib_cran, - 'libelle' => 'Mezzanine', - 'description' => '', - 'image' => 'mezzanine.png']); + $plan = $this->fixture('Class_Plan', + ['id'=> 3, + 'bib' => $this->bib_cran, + 'libelle' => 'Mezzanine', + 'description' => '', + 'image' => 'mezzanine.png']); $this->dispatch('/admin/bib/ajaximageplan/id_plan/3'); @@ -851,7 +852,8 @@ class BibControllerAjaxImagePlanTest extends BibControllerTestCase { /** @test */ public function ajaxShouldReturnURLImage() { - $this->assertContains("photobib/plans/bib_3_plan_3.png",$this->_response->getBody()); + $this->assertContains('photobib/plans/bib_3_plan_3.png', + $this->_response->getBody()); } } diff --git a/tests/application/modules/opac/controllers/NoticeAjaxControllerTest.php b/tests/application/modules/opac/controllers/NoticeAjaxControllerTest.php index 865480066fd475d1e626f248565e43608ca3b971..d5910d3cb2cc664fde14f5e9070346f21d9d1cd4 100644 --- a/tests/application/modules/opac/controllers/NoticeAjaxControllerTest.php +++ b/tests/application/modules/opac/controllers/NoticeAjaxControllerTest.php @@ -425,23 +425,23 @@ class NoticeAjaxControllerExemplairesTest extends AbstractControllerTestCase { $this->fixture('Class_IntBib', ['id' => 4,'comm_sigb' => Class_IntBib::COM_NANOOK]); $exemplaires = [ [ - 'id_bib' => 99, + 'id_bib' => 99, 'id_int_bib' => 4, - 'id_notice' => 123, - 'id' => '6778778778', - 'annexe' => 'MOUL', - 'section' => 'A9', - 'emplacement' => 'emplacement de test', - 'count(*)' => 3, - 'cote' => 'VOD-T-DLJ', - 'dispo' => 'Disponible', - 'date_retour' => 'En mai', - 'reservable' => true, - 'code_barres' => '7777734343488']]; + 'id_notice' => 123, + 'id' => '6778778778', + 'annexe' => 'MOUL', + 'section' => 'A9', + 'emplacement' => 'emplacement de test', + 'count(*)' => 3, + 'cote' => 'VOD-T-DLJ', + 'dispo' => 'Disponible', + 'date_retour' => 'En mai', + 'reservable' => true, + 'code_barres' => '7777734343488']]; $mock_sql ->whenCalled('fetchAll') - ->with('Select id_notice,id_bib,cote,count(*)id_int_bib_id_origine from exemplaires where id_notice=123 group by 1,2,3', + ->with('Select id_notice,id_bib,cote,count(*),id_int_bib,id_origine from exemplaires where id_notice=123 group by 1,2,3', false) ->answers($exemplaires);