diff --git a/tests/src/Core/Cache/MemcacheCacheDriverTest.php b/tests/src/Core/Cache/MemcacheCacheDriverTest.php index d2078236e2..5ed0a3a2e5 100644 --- a/tests/src/Core/Cache/MemcacheCacheDriverTest.php +++ b/tests/src/Core/Cache/MemcacheCacheDriverTest.php @@ -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 { diff --git a/tests/src/Core/Cache/MemcachedCacheDriverTest.php b/tests/src/Core/Cache/MemcachedCacheDriverTest.php index 2484517424..4872546b54 100644 --- a/tests/src/Core/Cache/MemcachedCacheDriverTest.php +++ b/tests/src/Core/Cache/MemcachedCacheDriverTest.php @@ -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 { diff --git a/tests/src/Core/Cache/RedisCacheDriverTest.php b/tests/src/Core/Cache/RedisCacheDriverTest.php index e13d95df4d..158534602a 100644 --- a/tests/src/Core/Cache/RedisCacheDriverTest.php +++ b/tests/src/Core/Cache/RedisCacheDriverTest.php @@ -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 {