]> git.mxchange.org Git - friendica.git/commitdiff
Move meaningful message inside Exception thrown in Cache tests
authorHypolite Petovan <mrpetovan@gmail.com>
Sun, 8 Jul 2018 05:46:06 +0000 (01:46 -0400)
committerHypolite Petovan <mrpetovan@gmail.com>
Mon, 16 Jul 2018 23:38:16 +0000 (19:38 -0400)
tests/src/Core/Cache/MemcacheCacheDriverTest.php
tests/src/Core/Cache/MemcachedCacheDriverTest.php
tests/src/Core/Cache/RedisCacheDriverTest.php

index d2078236e2ed1abb47375983f4fe79d6372660e5..5ed0a3a2e5dd24f6a53393019dd10b57985cad65 100644 (file)
@@ -19,8 +19,7 @@ class MemcacheCacheDriverTest extends MemoryCacheTest
                        try {
                                $this->cache = CacheDriverFactory::create('memcache');
                        } catch (\Exception $exception) {
-                               print "Memcache - TestCase failed: " . $exception->getMessage();
-                               throw new \Exception();
+                               throw new \Exception("Memcache - TestCase failed: " . $exception->getMessage(), $exception->getCode(), $exception);
                        }
                        return $this->cache;
                } else {
index 2484517424c476f0c0fbfa4c219158d776471d30..4872546b54c735fee5a3eeedf8eb774c292fa0b0 100644 (file)
@@ -19,8 +19,7 @@ class MemcachedCacheDriverTest extends MemoryCacheTest
                        try {
                                $this->cache = CacheDriverFactory::create('memcached');
                        } catch (\Exception $exception) {
-                               print "Memcached - TestCase failed: " . $exception->getMessage();
-                               throw new \Exception();
+                               throw new \Exception("Memcached - TestCase failed: " . $exception->getMessage(), $exception->getCode(), $exception);
                        }
                        return $this->cache;
                } else {
index e13d95df4d7f4319715c656af9405315b9262ed3..158534602a32921669eddeb7c75c80aa1b223e0b 100644 (file)
@@ -19,8 +19,7 @@ class RedisCacheDriverTest extends MemoryCacheTest
                        try {
                                $this->cache = CacheDriverFactory::create('redis');
                        } catch (\Exception $exception) {
-                               print "Redis - TestCase failed: " . $exception->getMessage();
-                               throw new \Exception();
+                               throw new \Exception("Redis - TestCase failed: " . $exception->getMessage(), $exception->getCode(), $exception);
                        }
                        return $this->cache;
                } else {