]> git.agnieray.net Git - galette.git/blobdiff - tests/Galette/Core/tests/units/History.php
Throw errors
[galette.git] / tests / Galette / Core / tests / units / History.php
index 497aebb36eab7d211e3ac4c5c5b4b06ff53bfec0..2cfacd794febf24d613da060e92cc8ad9c5f756a 100644 (file)
@@ -7,7 +7,7 @@
  *
  * PHP version 5
  *
- * Copyright © 2016 The Galette Team
+ * Copyright © 2016-2021 The Galette Team
  *
  * This file is part of Galette (http://galette.tuxfamily.org).
  *
@@ -28,7 +28,7 @@
  * @package   GaletteTests
  *
  * @author    Johan Cwiklinski <johan@x-tnd.be>
- * @copyright 2016 The Galette Team
+ * @copyright 2016-2021 The Galette Team
  * @license   http://www.gnu.org/licenses/gpl-3.0.html GPL License 3.0 or (at your option) any later version
  * @version   SVN: $Id$
  * @link      http://galette.tuxfamily.org
@@ -125,38 +125,4 @@ class History extends GaletteTestCase
 
         $this->cleanHistory();
     }
-
-    /**
-     * Test add that throws an exception
-     *
-     * @return void
-     */
-    public function testAddWException()
-    {
-        $this->zdb = new \mock\Galette\Core\Db();
-        $this->calling($this->zdb)->execute = function ($o) {
-            throw new \LogicException('Error executing query!', 123);
-        };
-
-        $this->history = new \Galette\Core\History($this->zdb, $this->login, $this->preferences);
-        $add = $this->history->add('Test');
-        $this->boolean($add)->isFalse();
-    }
-
-    /**
-     * Test getHistory that throws an exception
-     *
-     * @return void
-     */
-    public function testGetHistoryWException()
-    {
-        $this->zdb = new \mock\Galette\Core\Db();
-        $this->calling($this->zdb)->execute = function ($o) {
-            throw new \LogicException('Error executing query!', 123);
-        };
-
-        $this->history = new \Galette\Core\History($this->zdb, $this->login, $this->preferences);
-        $list = $this->history->getHistory();
-        $this->boolean($list)->isFalse();
-    }
 }