Commit de730c1c authored by Patrick Barroca's avatar Patrick Barroca 🐧

Merge branch 'hotline#89072_pb_de_prolongation_avec_web_service_carthame' into 'hotline'

hotline #89072 Carthame WS: read renewable status for loans

See merge request !3179
parents e7197cd7 0b62cade
Pipeline #7690 failed with stage
in 32 minutes and 12 seconds
- ticket #89072 : SIGB Carthame : prise en compte du statut de prolongation des prêts
\ No newline at end of file
......@@ -78,6 +78,14 @@ class Class_WebService_SIGB_Carthame_AccountResponseReader {
}
public function endSFl($data) {
if (!$this->_xml_parser->inParents('F400'))
return;
$this->_current_emprunt->setRenewable($data === '0');
}
public function endSFa($data) {
$data = (string)$data;
......
......@@ -722,6 +722,12 @@ class CarthameEmprunteurPatrickBTest extends CarthameOperationTestCase {
}
/** @test */
public function firstEmpruntShouldBeRenewable() {
$this->assertTrue($this->emprunteur->getEmpruntAt(0)->isRenewable());
}
/** @test */
public function secondEmpruntCopyIdShouldBe46666() {
$this->assertEquals('46666', $this->emprunteur->getEmpruntAt(1)->getExemplaire()->getId());
......@@ -734,6 +740,12 @@ class CarthameEmprunteurPatrickBTest extends CarthameOperationTestCase {
}
/** @test */
public function secondEmpruntShouldNotBeRenewable() {
$this->assertFalse($this->emprunteur->getEmpruntAt(1)->isRenewable());
}
/** @test */
public function firstReservationCopyNoticeShouldBeMillenium() {
$this->assertEquals('Millenium', $this->emprunteur->getReservationAt(0)->getExemplaire()->getNoNotice());
......@@ -1164,14 +1176,14 @@ class CarthameTestFixtures {
<SFb>20110505</SFb>
<SFc>20110526</SFc>
<SFk>45699</SFk>
<SFl>-2</SFl>
<SFl>0</SFl>
</F400>
<F400>
<SFa>Z6PO</SFa>
<SFb>20110505</SFb>
<SFc>20370526</SFc>
<SFk>46666</SFk>
<SFl>-2</SFl>
<SFl>-7</SFl>
</F400>
<F500>
<SFa>Millenium</SFa>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment