From e68c0f1bc4d6afcce3bc2b88836401e39eccbddb Mon Sep 17 00:00:00 2001 From: gloas <gloas@git-test.afi-sa.fr> Date: Fri, 6 Sep 2013 12:30:23 +0000 Subject: [PATCH] =?UTF-8?q?webservice=20Alo=C3=A8s=20CASQY=20ajout=20de=20?= =?UTF-8?q?l=20edition=20dans=20le=20colonne=20cote=20du=20tableau=20des?= =?UTF-8?q?=20exemplaires=20de=20la=20notice=20+=20tests?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/Class/WebService/SIGB/Exemplaire.php | 1 + library/ZendAfi/View/Helper/Notice/Exemplaires.php | 2 +- .../ZendAfi/View/Helper/Notice/ExemplairesTest.php | 12 +++++++++--- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/library/Class/WebService/SIGB/Exemplaire.php b/library/Class/WebService/SIGB/Exemplaire.php index 8e7a2aa529e..2411911ab6f 100644 --- a/library/Class/WebService/SIGB/Exemplaire.php +++ b/library/Class/WebService/SIGB/Exemplaire.php @@ -362,6 +362,7 @@ class Class_WebService_SIGB_Exemplaire { public function setEdition($edition) { $this->edition = $edition; + return $this; } diff --git a/library/ZendAfi/View/Helper/Notice/Exemplaires.php b/library/ZendAfi/View/Helper/Notice/Exemplaires.php index 3d54b4361f0..1574ba19da1 100644 --- a/library/ZendAfi/View/Helper/Notice/Exemplaires.php +++ b/library/ZendAfi/View/Helper/Notice/Exemplaires.php @@ -74,7 +74,7 @@ class ZendAfi_View_Helper_Notice_Exemplaires extends Zend_View_Helper_HtmlElemen if($preferences["section"]==1) $html.='<td class="section">'.Class_Codification::getInstance()->getLibelleFacette("S".$ex["section"]).'</td>'; if($preferences["emplacement"]==1) $html.='<td class="eplacement">'.Class_Codification::getInstance()->getLibelleFacette("E".$ex["emplacement"]).'</td>'; if($preferences["grouper"]==0) $html.='<td class="grouper">'.$ex["count(*)"].' ex.</td>'; - $html.='<td class="cote">'.$ex["cote"].'</td>'; + $html.='<td class="cote">'.$ex["cote"].(isset($ex["edition"]) ? ' '.$ex["edition"] : '').'</td>'; if($preferences["dispo"]==1) { $class_dispo=''; if($ex["dispo"] == Class_WebService_SIGB_Exemplaire::DISPO_LIBRE){ diff --git a/tests/library/ZendAfi/View/Helper/Notice/ExemplairesTest.php b/tests/library/ZendAfi/View/Helper/Notice/ExemplairesTest.php index d9fb4bd71a9..061a9b3dcc6 100644 --- a/tests/library/ZendAfi/View/Helper/Notice/ExemplairesTest.php +++ b/tests/library/ZendAfi/View/Helper/Notice/ExemplairesTest.php @@ -108,7 +108,8 @@ abstract class NoticeHtmlGetExemplairesWithOneExemplaireAndWebServiceTestCase ex ->setDisponibiliteEnPret() ->setDateRetour('20/03/2012') ->beReservable() - ->setNbReservations(4)) + ->setNbReservations(4) + ->setEdition(2011)) ->whenCalled('isConnected') ->answers(true) ->getWrapper()); @@ -125,7 +126,7 @@ abstract class NoticeHtmlGetExemplairesWithOneExemplaireAndWebServiceTestCase ex 'section' => 3, 'emplacement' => 2, 'nb_resas'=>0, - 'edition'=>'2011']; + 'edition'=>'2001']; } } @@ -150,9 +151,14 @@ extends NoticeHtmlGetExemplairesWithOneExemplaireAndWebServiceTestCase { /** @test **/ - public function disponibiliteShoudBeDisponibleAnd2Reservation() { + public function disponibiliteShoudBeDisponibleAnd4Reservations() { $this->assertXPathContentContains($this->html,'//td',utf8_encode('En prêt 4 réservations en cours'),$this->html); } + + /** @test **/ + public function coteShouldBeDSEMAnd2011() { + $this->assertXPathContentContains($this->html, '//td', utf8_encode('DSEM 2011'), $this->html); + } } -- GitLab