From fae544f82f9ddab2bdfdf678e7635ff66084d461 Mon Sep 17 00:00:00 2001
From: Laurent Laffont <llaffont@afi-sa.fr>
Date: Tue, 3 Jan 2017 14:12:18 +0100
Subject: [PATCH] rel #50182 : try to fixture koha service

---
 .../library/ZendAfi/View/Helper/Status/TestCase.php | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/tests/library/ZendAfi/View/Helper/Status/TestCase.php b/tests/library/ZendAfi/View/Helper/Status/TestCase.php
index 8dfca3546cc..3905d8f7745 100644
--- a/tests/library/ZendAfi/View/Helper/Status/TestCase.php
+++ b/tests/library/ZendAfi/View/Helper/Status/TestCase.php
@@ -111,7 +111,6 @@ abstract class ZendAfi_View_Helper_Status_TestCase extends ViewHelperTestCase {
 
 
   protected function _setupILS() {
-
     $this->fixture('Class_IntBib',
                    ['id' => 5,
                     'comm_params' => ['url_serveur' => 'http://localhost/koha'],
@@ -172,6 +171,14 @@ abstract class ZendAfi_View_Helper_Status_TestCase extends ViewHelperTestCase {
     $this->_setupVars();
     $time_source = new TimeSourceForTest('2016-12-05 11:00:00');
     Class_Systeme_Report::setTimeSource($time_source);
+
+    $this->old_http_client = Zend_Registry::get('httpClient');
+    Zend_Registry::set('httpClient', $this->mock());
+  }
+
+
+  public function tearDown() {
+    Zend_Registry::set('httpClient', $this->old_http_client);
+    parent::tearDown();
   }
-}
-?>
\ No newline at end of file
+}
\ No newline at end of file
-- 
GitLab