Skip to content
Snippets Groups Projects
Commit fa5e6e8b authored by Ghislain Loas's avatar Ghislain Loas
Browse files

dev #30963 add fixture to fix failure

parent 203b124f
Branches
Tags
3 merge requests!1267Master,!1247Dev#30936 dev30936 cdscript import,!1206Dev#30936 dev30936 cdscript import
......@@ -22,14 +22,29 @@
class NoticeAjaxControllerCdScriptRecordTest extends AbstractControllerTestCase {
protected
$_storm_default_to_volatile = true,
$_record_le_kiosque,
$_item_le_kiosque,
$_service,
$_sigb_le_kiosque;
$_sigb_le_kiosque,
$_paul;
public function setUp() {
parent::setUp();
$this->_paul = $this->fixture('Class_Users',
['id' => 15,
'login' => 'paul',
'nom' => 'Le Pollux',
'prenom' => 'Paul',
'id_sigb' => '654987',
'mail' => 'anemail@web.com',
'naissance' => '2002-12-14',
'password' => 'pollux',
'date_fin' => '2015-12-14']);
ZendAfi_Auth::getInstance()->logUser($this->_paul);
$config = Class_Profil::getCurrentProfil()->getCfgNoticeAsArray();
$config['exemplaires']['grouper'] = '1';
Class_Profil::getCurrentProfil()->setCfgNotice($config);
......@@ -51,6 +66,7 @@ class NoticeAjaxControllerCdScriptRecordTest extends AbstractControllerTestCase
'id_bib' => '3',
'cote' => '',
'zone995' => 'a:3:{i:0;a:2:{s:4:"code";s:1:"a";s:6:"valeur";s:10:"Le Kiosque";}i:1;a:2:{s:4:"code";s:1:"b";s:6:"valeur";s:3:"kio";}i:2;a:2:{s:4:"code";s:1:"f";s:6:"valeur";s:3:"319";}}']);
$this->_record_le_kiosque = $this->fixture('Class_Notice',
['id' => 2,
'exemplaires' => [$this->_item_le_kiosque]]);
......@@ -59,14 +75,15 @@ class NoticeAjaxControllerCdScriptRecordTest extends AbstractControllerTestCase
'remote_library_id' => 2]);
$this->_service->setTimeSource(new TimeSourceForTest('2015-10-28 09:00:00'));
$this->dispatch('/opac/noticeajax/exemplaires/id_notice/2', true);
$this->_sigb_le_kiosque = $this->_service->getNotice('456789')->getExemplaireByCodeBarre('456789');
$this->dispatch('/opac/noticeajax/exemplaires/id_notice/2', true);
}
/** @test */
public function linkToJumelShouldBePresent() {
$this->assertXPathContentContains('//table//a[contains(@href, "www.jumel39.fr/docnum.php?bib=2&res=kio&lien=456789&time=1446019200")]', 'Description en ligne');
$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());
}
......
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