Skip to content
Snippets Groups Projects
Commit 65771993 authored by efalcy's avatar efalcy
Browse files

dev#178962 fix bug on destruct Service method

parent 2a6e91df
1 merge request!4733dev#178962 fix bug on destruct Service method
- hotline #178962 : Connecteur Orphée : Quand un utilisateur est connecté, les exemplaires sur les pages notices ne se chargent plus
\ No newline at end of file
...@@ -71,7 +71,7 @@ class Class_WebService_SIGB_Orphee_Service extends Class_WebService_SIGB_Abstrac ...@@ -71,7 +71,7 @@ class Class_WebService_SIGB_Orphee_Service extends Class_WebService_SIGB_Abstrac
public function __destruct() { public function __destruct() {
if ($this->isConnected()) if ($this->_session_strategy && $this->isConnected())
$this->disconnect(); $this->disconnect();
} }
......
...@@ -76,6 +76,16 @@ class OrpheeServiceGetServiceTest extends ModelTestCase { ...@@ -76,6 +76,16 @@ class OrpheeServiceGetServiceTest extends ModelTestCase {
} }
/** @test */
function shouldNotRecreateSessionStrategyOnServiceDestruction() {
$orphee = Class_WebService_SIGB_Orphee_Service::getService('tests/fixtures/orphee.wsdl');
$orphee->setSearchClient($this->_search_client);
unset($orphee);
gc_collect_cycles();
$this->assertFalse($this->_search_client->methodHasBeenCalled('EndSession'));
}
/** @test */ /** @test */
public function serviceHoldModeShouldDefaultToHoldTitle() { public function serviceHoldModeShouldDefaultToHoldTitle() {
$orphee = Class_WebService_SIGB_Orphee::getService(['url_serveur' => 'tests/fixtures/orphee.wsdl', $orphee = Class_WebService_SIGB_Orphee::getService(['url_serveur' => 'tests/fixtures/orphee.wsdl',
......
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