diff --git a/VERSIONS_HOTLINE/128187 b/VERSIONS_HOTLINE/128187 new file mode 100644 index 0000000000000000000000000000000000000000..55a10d4d43fa4a70d3b373adaf99de7960ef2058 --- /dev/null +++ b/VERSIONS_HOTLINE/128187 @@ -0,0 +1 @@ + - ticket #128187 : SIGB Carthame : correction de la mise à jour automatique du numéro d'abonné lors de la connexion au portail. \ 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 73862d21a5b12bf666e6a306701ef05b3f6a64e9..dfe79c9a4f7b500c813a8e5367e8b316bed61331 100644 --- a/library/Class/WebService/SIGB/Carthame/AccountResponseReader.php +++ b/library/Class/WebService/SIGB/Carthame/AccountResponseReader.php @@ -49,6 +49,14 @@ class Class_WebService_SIGB_Carthame_AccountResponseReader { } + public function endSFo($data) { + if (!$this->_xml_parser->inParents('F000')) + return; + + $this->_emprunteur->setCodeBarres($data); + } + + public function startF400() { $this->_current_emprunt = Class_WebService_SIGB_Emprunt::newInstanceWithEmptyExemplaire(); } diff --git a/tests/library/Class/WebService/SIGB/CarthameTest.php b/tests/library/Class/WebService/SIGB/CarthameTest.php index dad4853756f5d5d958db2278e5950e020b50fba4..ab69ce55ccba6e1dbdbf7f2f4f502f45db13e0b3 100644 --- a/tests/library/Class/WebService/SIGB/CarthameTest.php +++ b/tests/library/Class/WebService/SIGB/CarthameTest.php @@ -644,14 +644,20 @@ class CarthameEmprunteurPatrickBTest extends CarthameOperationTestCase { 'login' => 'pbarroca', 'password' => '1974', 'role_level' => ZendAfi_Acl_AdminControllerRoles::ABONNE_SIGB, - 'idabon' => 'pbarroca', + 'idabon' => '898908098', 'id_site' => 3, 'int_bib' => $library]); ZendAfi_Auth::getInstance()->logUser($user); $this->emprunteur = $this->service->getEmprunteur($user); + } + + /** @test */ + public function userBarrocaIdAbonShouldNotBeUpdated() { + $this->emprunteur->updateUser(Class_Users::find(56)); + $this->assertEquals('898908098', Class_Users::find(56)->getIdabon()); } @@ -1169,6 +1175,7 @@ class CarthameTestFixtures { <SFb>I</SFb> <SFd>5</SFd> <SFe>10</SFe> + <SFo>898908098</SFo> </F000> <F100> <SFa>Barroca, Patrick</SFa>