From e34df372265b8e86061f41745dda6991cac86eda Mon Sep 17 00:00:00 2001 From: Ghislain Loas <ghislo@sandbox.pergame.net> Date: Fri, 30 Oct 2015 13:55:49 +0100 Subject: [PATCH] dev #30936 remove empty@email --- library/Class/WebService/SIGB/CdScript/Service.php | 5 ++--- .../opac/controllers/NoticeAjaxControllerCdScriptTest.php | 4 ++-- tests/library/Class/WebService/SIGB/CdScriptTest.php | 4 ++-- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/library/Class/WebService/SIGB/CdScript/Service.php b/library/Class/WebService/SIGB/CdScript/Service.php index 18227ec38cb..f04aaab5105 100644 --- a/library/Class/WebService/SIGB/CdScript/Service.php +++ b/library/Class/WebService/SIGB/CdScript/Service.php @@ -78,7 +78,7 @@ class Class_Webservice_SIGB_CdScript_Service { $user->getNom(), $user->getPrenom(), $user->getNaissance(), - 'empty@email', + '', $user->getDateFin()]); } @@ -86,14 +86,13 @@ class Class_Webservice_SIGB_CdScript_Service { public function getNotice($id) { $sigb_record = new Class_WebService_SIGB_Notice($id); $sigb_item = new Class_WebService_SIGB_Exemplaire($id); - $sigb_record->addExemplaire($sigb_item); if($item = $this->_getItem($id)) { $sigb_item->setCodeBarre($id); $sigb_item->setBibliotheque($item->getBib()); $item->setUrl($this->getRessourceUrl($item))->save(); } - + $sigb_record->addExemplaire($sigb_item); return $sigb_record; } diff --git a/tests/application/modules/opac/controllers/NoticeAjaxControllerCdScriptTest.php b/tests/application/modules/opac/controllers/NoticeAjaxControllerCdScriptTest.php index 4842d9606b6..65e0b95fcae 100644 --- a/tests/application/modules/opac/controllers/NoticeAjaxControllerCdScriptTest.php +++ b/tests/application/modules/opac/controllers/NoticeAjaxControllerCdScriptTest.php @@ -84,7 +84,7 @@ class NoticeAjaxControllerCdScriptRecordTest extends AbstractControllerTestCase /** @test */ public function linkToJumelShouldBePresent() { - $this->assertXPathContentContains('//table//a[contains(@href, "www.jumel39.fr/docnum.php?bib=2&res=kio&lien=456789&time=1446019200&user=654987:Le Pollux:Paul:2002-12-14:empty@email:2015-12-14")]', 'Description en ligne', $this->_response->getBody()); + $this->assertXPathContentContains('//table//a[contains(@href, "www.jumel39.fr/docnum.php?bib=2&res=kio&lien=456789&time=1446019200&user=654987:Le Pollux:Paul:2002-12-14::2015-12-14")]', 'Description en ligne', $this->_response->getBody()); } @@ -96,7 +96,7 @@ class NoticeAjaxControllerCdScriptRecordTest extends AbstractControllerTestCase /** @test */ public function scriptTargetBlankShouldBePresent() { - $this->assertXpathContentContains('//script', 'setupAnchorsTarget'); + $this->assertXPathContentContains('//script', 'setupAnchorsTarget'); } } ?> \ No newline at end of file diff --git a/tests/library/Class/WebService/SIGB/CdScriptTest.php b/tests/library/Class/WebService/SIGB/CdScriptTest.php index 85684e1f9a3..208dfabb432 100644 --- a/tests/library/Class/WebService/SIGB/CdScriptTest.php +++ b/tests/library/Class/WebService/SIGB/CdScriptTest.php @@ -90,7 +90,7 @@ class CdScriptServiceTest extends CdScriptTestCase { /** @test */ public function ressourceUrlShouldBeJumelBib2UserPaulAnd12oclok() { - $this->assertEquals('www.jumel39.fr/docnum.php?bib=2&res=kio&lien=456789&time=1446019200&user=654987:Le Pollux:Paul:2002-12-14:empty@email:2015-12-14', $this->_service->getRessourceUrl($this->_le_kiosque)); + $this->assertEquals('www.jumel39.fr/docnum.php?bib=2&res=kio&lien=456789&time=1446019200&user=654987:Le Pollux:Paul:2002-12-14::2015-12-14', $this->_service->getRessourceUrl($this->_le_kiosque)); } @@ -102,7 +102,7 @@ class CdScriptServiceTest extends CdScriptTestCase { /** @test */ public function leKiosqueItemUrlShouldBeJumelLink() { - $this->assertEquals('www.jumel39.fr/docnum.php?bib=2&res=kio&lien=456789&time=1446019200&user=654987:Le Pollux:Paul:2002-12-14:empty@email:2015-12-14', $this->_le_kiosque->getUrl()); + $this->assertEquals('www.jumel39.fr/docnum.php?bib=2&res=kio&lien=456789&time=1446019200&user=654987:Le Pollux:Paul:2002-12-14::2015-12-14', $this->_le_kiosque->getUrl()); } -- GitLab