diff --git a/VERSIONS_HOTLINE/157441 b/VERSIONS_HOTLINE/157441 new file mode 100644 index 0000000000000000000000000000000000000000..4198fda99ad19876c708f438308d41b03a0a279e --- /dev/null +++ b/VERSIONS_HOTLINE/157441 @@ -0,0 +1 @@ + - correctif #157441 : Carthame : Correction de l'affichage de la bibliothèque dans l'onglet réservation des abonnés. \ No newline at end of file diff --git a/library/Class/WebService/SIGB/Carthame/AccountResponseReader.php b/library/Class/WebService/SIGB/Carthame/AccountResponseReader.php index dfe79c9a4f7b500c813a8e5367e8b316bed61331..c35cd7a82fb7c5a18bb0723c602c81322cafa2bf 100644 --- a/library/Class/WebService/SIGB/Carthame/AccountResponseReader.php +++ b/library/Class/WebService/SIGB/Carthame/AccountResponseReader.php @@ -146,6 +146,18 @@ class Class_WebService_SIGB_Carthame_AccountResponseReader { } + public function endSFe($data) { + if ($this->_xml_parser->inParents('F500')) + return $this->_current_reservation->setBibliotheque($data); + } + + + public function endSFj($data) { + if ($this->_xml_parser->inParents('F500')) + return $this->_current_reservation->setPickupLocationLabel($data); + } + + protected function _holdStatus($data) { $mapping = ['A' => $this->_('En attente'), 'D' => $this->_('Disponible'), diff --git a/tests/library/Class/WebService/SIGB/CarthameTest.php b/tests/library/Class/WebService/SIGB/CarthameTest.php index ab69ce55ccba6e1dbdbf7f2f4f502f45db13e0b3..6d257cfbcccb4809489c125d5d41dc3b1c5c9465 100644 --- a/tests/library/Class/WebService/SIGB/CarthameTest.php +++ b/tests/library/Class/WebService/SIGB/CarthameTest.php @@ -763,6 +763,18 @@ class CarthameEmprunteurPatrickBTest extends CarthameOperationTestCase { } + /** @test */ + public function firstReservationPickupLocationLabelShouldBeLunelViel() { + $this->assertEquals('Lunel-Viel', $this->emprunteur->getReservationAt(0)->getPickupLocationLabel()); + } + + + /** @test */ + public function firstReservationBibliothequeShouldBeMediathequePaysDeLunel() { + $this->assertEquals('Médiathèque Pays de Lunel', $this->emprunteur->getReservationAt(0)->getBibliotheque()); + } + + /** @test */ public function firstReservationStatusShouldBeEnAttente() { $this->assertEquals('En attente', $this->emprunteur->getReservationAt(0)->getEtat()); @@ -847,6 +859,12 @@ class CarthameEmprunteurPatrickBTest extends CarthameOperationTestCase { } + /** @test */ + public function thirdReservationPickupLocationLabelShouldBeBazace() { + $this->assertEquals('Bazace', $this->emprunteur->getReservationAt(2)->getPickupLocationLabel()); + } + + /** @test */ public function emprunteurShouldHave3LoansInHistory() { $this->assertCount(3, $this->emprunteur->getLoansHistory()->getLoans()); @@ -1214,6 +1232,8 @@ class CarthameTestFixtures { <SFa>Millenium</SFa> <SFb>20110505</SFb> <SFd>A</SFd> + <SFe>Médiathèque Pays de Lunel</SFe> + <SFj>Lunel-Viel</SFj> <SFh>MillRes</SFh> </F500> <F500> @@ -1226,6 +1246,7 @@ class CarthameTestFixtures { <SFa>Al Amut</SFa> <SFb>20110517</SFb> <SFd>T</SFd> + <SFj>Bazace</SFj> <SFh>AmutRes</SFh> </F500> <F490>