Skip to content
Snippets Groups Projects
Commit f2b46ff2 authored by Patrick Barroca's avatar Patrick Barroca :grin:
Browse files

dev #40971 : fix failures

parent 8d5b15a1
Branches
Tags
3 merge requests!2334Master,!2178Dev#40971 pouvoir prendre l email comme identifiant alternatif cctp agglo2b,!2174Dev#40971 pouvoir prendre l email comme identifiant alternatif cctp agglo2b
Pipeline #1598 failed with stage
in 11 minutes and 37 seconds
......@@ -645,6 +645,7 @@ class NoticeAjaxControllerResumeAlbumTest extends AbstractControllerTestCase {
abstract class NoticeAjaxControllerExemplairesTestCase extends AbstractControllerTestCase {
protected
$_storm_default_to_volatile=true,
$_notice,
$_sigb_exemplaire;
......@@ -656,7 +657,8 @@ abstract class NoticeAjaxControllerExemplairesTestCase extends AbstractControlle
$this->fixture('Class_IntBib',
['id' => 4,
'comm_sigb' => Class_IntBib::COM_NANOOK]);
'comm_sigb' => Class_IntBib::COM_NANOOK,
'comm_params' => ['url_serveur' => 'http://nanook']]);
$this->fixture('Class_bib',
['id' => 99]);
......@@ -705,7 +707,10 @@ abstract class NoticeAjaxControllerExemplairesTestCase extends AbstractControlle
->whenCalled('canConsult')
->answers(false);
Class_WebService_SIGB_Nanook::setService($mock_sigb_comm);
Class_WebService_SIGB_Nanook::setService(['url_serveur' => 'http://nanook',
'id_bib' => 4,
'type' => Class_IntBib::COM_NANOOK,],
$mock_sigb_comm);
}
}
......@@ -1415,7 +1420,7 @@ class NoticeAjaxControllerDisponibiliteNoticeTest extends AbstractControllerTest
abstract class NoticeAjaxControllerNoticeWithAvisTestCase extends AbstractControllerTestCase {
protected $_storm_default_to_volatile = true;
public function setup() {
parent::setup();
......
......@@ -104,27 +104,31 @@ class RechercheControllerReservationPickupAjaxActionPostTest extends AbstractCon
class RechercheControllerReservationPickupAjaxActionTestWithChosenPickupDispatch extends AbstractControllerTestCase {
protected $_json, $_xpath;
protected $_json, $_xpath, $_storm_default_to_volatile = true;
public function setUp() {
parent::setUp();
$this->jajm = $this->fixture('Class_Users',
['id' => 1,
'login' => 'jajm',
'password' => 'secret',
'idabon' => '0000007',
'int_bib' => $this->fixture('Class_IntBib',
['id' => 1,
'comm_sigb' => Class_IntBib::COM_NANOOK,
'comm_params' => ['url_serveur' => 'http://bib.valensol.net']])
]);
$this->jajm = $this
->fixture('Class_Users',
['id' => 1,
'login' => 'jajm',
'password' => 'secret',
'idabon' => '0000007',
'int_bib' => $this->fixture('Class_IntBib',
['id' => 1,
'comm_sigb' => Class_IntBib::COM_NANOOK,
'comm_params' => ['url_serveur' => 'http://bib.valensol.net']])
]);
$this->nanook = Storm_Test_ObjectWrapper::mock()
->whenCalled('isConnected')->answers(true)
->whenCalled('reserverExemplaire')->answers(true);
Class_WebService_SIGB_Nanook::setService($this->nanook);
Class_WebService_SIGB_Nanook::setService(['url_serveur' => 'http://bib.valensol.net',
'id_bib' => 1,
'type' => Class_IntBib::COM_NANOOK,],
$this->nanook);
ZendAfi_Auth::getInstance()->logUser($this->jajm);
......@@ -148,8 +152,9 @@ class RechercheControllerReservationPickupAjaxActionTestWithChosenPickupDispatch
}
class RechercheControllerReservationPickupAjaxActionTestWithPatronLibraryPickup extends AbstractControllerTestCase {
protected $_json, $_xpath;
class RechercheControllerReservationPickupAjaxActionTestWithPatronLibraryPickup
extends AbstractControllerTestCase {
protected $_json, $_xpath, $_storm_default_to_volatile = true;
public function setUp() {
parent::setUp();
......@@ -171,7 +176,10 @@ class RechercheControllerReservationPickupAjaxActionTestWithPatronLibraryPickup
->whenCalled('providesPickupLocations')->answers(false)
->whenCalled('getUserAnnexe')->answers('12');
Class_WebService_SIGB_Nanook::setService($this->nanook);
Class_WebService_SIGB_Nanook::setService(['url_serveur' => 'http://bib.valensol.net',
'id_bib' => 12,
'type' => Class_IntBib::COM_NANOOK,],
$this->nanook);
ZendAfi_Auth::getInstance()->logUser($this->jajm);
......@@ -207,7 +215,7 @@ class RechercheControllerReservationPickupAjaxActionTestWithPatronLibraryPickup
class RechercheControllerReservationPickupAjaxActionTestWithItemLibraryPickup extends AbstractControllerTestCase {
protected $_json, $_xpath;
protected $_json, $_xpath, $_storm_default_to_volatile=true;
public function setUp() {
parent::setUp();
......@@ -229,7 +237,10 @@ class RechercheControllerReservationPickupAjaxActionTestWithItemLibraryPickup ex
->whenCalled('reserverExemplaire')->answers(true);
Class_WebService_SIGB_Nanook::setService($this->nanook);
Class_WebService_SIGB_Nanook::setService(['url_serveur' => 'http://bib.valensol.net',
'id_bib' => 1,
'type' => Class_IntBib::COM_NANOOK,],
$this->nanook);
ZendAfi_Auth::getInstance()->logUser($this->jajm);
......
......@@ -478,21 +478,24 @@ class CommSigbLocalNanookTest extends CommSigbTestCase {
public function setUp() {
parent::setUp();
$this->bib_pontault = Class_IntBib::getLoader()
->newInstanceWithId(5)
->setCommParams(array("url_serveur" => 'http://192.168.2.3:9080/afi_Nanook-0.7.5/ilsdi/'))
$params = ["url_serveur" => 'http://192.168.2.3:9080/afi_Nanook-0.7.5/ilsdi/'];
$this->bib_pontault = Class_IntBib::newInstanceWithId(5)
->setCommParams(["url_serveur" => 'http://192.168.2.3:9080/afi_Nanook-0.7.5/ilsdi/'])
->setCommSigb(7);
Class_WebService_SIGB_Nanook::setService($this->createMockForService('Nanook'));
Class_WebService_SIGB_Nanook::setService(['url_serveur' => 'http://192.168.2.3:9080/afi_Nanook-0.7.5/ilsdi/',
'id_bib' => 5,
'type' => Class_IntBib::COM_NANOOK,],
$this->createMockForService('Nanook'));
}
/** @test */
public function getModeCommShouldReturnAnArrayWithCommParams() {
$this->assertEquals(array("url_serveur" => 'http://192.168.2.3:9080/afi_Nanook-0.7.5/ilsdi/',
"type" => Class_IntBib::COM_NANOOK,
'id_bib' => 5),
$this->assertEquals(["url_serveur" => 'http://192.168.2.3:9080/afi_Nanook-0.7.5/ilsdi/',
"type" => Class_IntBib::COM_NANOOK,
'id_bib' => 5],
$this->bib_pontault->getModeComm(5));
}
}
......
......@@ -74,13 +74,18 @@ abstract class AuthCommSigbWithWebServicesAndAbonneZorkTestCase extends AuthComm
public function setUp() {
parent::setUp();
$this->fixture('Class_IntBib', ['id' => 1, 'comm_sigb' => Class_IntBib::COM_NANOOK]);
$comm_params = ['url_serveur' => 'http://localhost:8080/afi_Nanook/ilsdi/',
'id_bib' => 1,
'type' => Class_IntBib::COM_NANOOK];
$this->fixture('Class_IntBib', ['id' => 1,
'comm_sigb' => Class_IntBib::COM_NANOOK,
'comm_params' => $comm_params]);
$this->fixture('Class_IntBib', ['id' => 95, 'comm_sigb' => Class_IntBib::COM_ORPHEE]);
$this->fixture('Class_IntBib', ['id' => 74,
'comm_sigb' => Class_IntBib::COM_OPSYS,
'nom_court' => 'TestingOpsys']);
Class_WebService_SIGB_Nanook::setService($this->nanook = $this->mock());
Class_WebService_SIGB_Nanook::setService($comm_params, $this->nanook = $this->mock());
Class_WebService_SIGB_Orphee::setService($this->orphee = $this->mock());
Class_WebService_SIGB_Opsys::setService($this->opsys = $this->mock());
......@@ -119,7 +124,7 @@ abstract class AuthCommSigbWithWebServicesAndAbonneZorkTestCase extends AuthComm
public function tearDown() {
Class_WebService_SIGB_Nanook::setService(null);
Class_WebService_SIGB_Nanook::reset();
Class_WebService_SIGB_Orphee::setService(null);
Class_WebService_SIGB_Opsys::setService(null);
......
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