diff --git a/library/Class/WebService/SIGB/Exemplaire.php b/library/Class/WebService/SIGB/Exemplaire.php index 8e7a2aa529e689c8ca26883672d29e248a197d4e..2411911ab6fbfa03a7f632aeca3b729d8ba6917a 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 3d54b4361f0518e9855de57e7a6099699a8fda3e..1574ba19da138fc4cb6262f958e277b392f6619c 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 d9fb4bd71a9b7bb10a7d39e400d4ddd702cee551..061a9b3dcc65eba70801d5675d7f480f34782ede 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); + } }