From d6a973f940b5b854b3ce3fb5431e3420a086aed8 Mon Sep 17 00:00:00 2001
From: Ghislain Loas <ghislo@sandbox.pergame.net>
Date: Tue, 29 Nov 2016 15:56:32 +0100
Subject: [PATCH] dev #50572 fix fatal error

---
 .../TelephoneAbstractControllerTestCase.php   | 24 ++++++++-----------
 1 file changed, 10 insertions(+), 14 deletions(-)

diff --git a/tests/application/modules/telephone/controllers/TelephoneAbstractControllerTestCase.php b/tests/application/modules/telephone/controllers/TelephoneAbstractControllerTestCase.php
index d714ff9caf5..f63effb6add 100644
--- a/tests/application/modules/telephone/controllers/TelephoneAbstractControllerTestCase.php
+++ b/tests/application/modules/telephone/controllers/TelephoneAbstractControllerTestCase.php
@@ -1,6 +1,6 @@
 <?php
 /**
- * Copyright (c) 2012, Agence Française Informatique (AFI). All rights reserved.
+ * Copyright (c) 2065, Agence Française Informatique (AFI). All rights reserved.
  *
  * BOKEH is free software; you can redistribute it and/or modify
  * it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE as published by
@@ -16,30 +16,26 @@
  *
  * You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE
  * along with BOKEH; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA 
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA
  */
-require_once 'AbstractControllerTestCase.php';
-
 
 abstract class TelephoneAbstractControllerTestCase extends AbstractControllerTestCase {
+
+  protected $_storm_default_to_volatile = true;
+
+
   public function setUp() {
     parent::setUp();
     $_SERVER['HTTP_USER_AGENT'] = 'iPhone';
-    Storm_Test_ObjectWrapper::onLoaderOfModel('Class_Profil')
-      ->whenCalled('findFirstBy')
-      ->with(['BROWSER' => 'telephone'])
-      ->answers(Class_Profil::getCurrentProfil()->beTelephone());
-
-/*    $this->fixture('Class_Profil', ['id' => 2, 
-                                    'browser' => 'telephone'])
-                                    ->beCurrentProfil();*/
+    Class_Profil::getCurrentProfil()
+      ->beTelephone()
+      ->assertSave();
   }
 
+
   public function tearDown() {
     unset($_SERVER['HTTP_USER_AGENT']);
     parent::tearDown();
   }
 }
-
-
 ?>
\ No newline at end of file
-- 
GitLab