Skip to content
Snippets Groups Projects
Commit 0b62cade authored by Laurent's avatar Laurent
Browse files

hotline #89072 Carthame WS: read renewable status for loans

parent 453ffdcd
Branches
Tags
2 merge requests!3297WIP: Master,!3179hotline #89072 Carthame WS: read renewable status for loans
Pipeline #7681 failed with stage
in 34 minutes and 20 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>
......
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