From 137561985c8a13f330a3c66cd1f5dcd09bcbfdcc Mon Sep 17 00:00:00 2001 From: Nicole Cordes <typo3@cordes.co> Date: Sat, 11 Feb 2017 16:52:10 +0100 Subject: [PATCH] [BUGFIX] Skip failing unit tests if preconditions not available The unit tests for RedisSessionBackendTest rely on a class \Redis which might not be available on all systems. Therefore the tests should be skipped to not fail. Resolves: #79758 Releases: master Change-Id: Ie14911e7ba90eaffd32585c1c18d642996bbf74c Reviewed-on: https://review.typo3.org/51636 Tested-by: TYPO3com <no-reply@typo3.com> Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch> Tested-by: Christian Kuhn <lolli@schwarzbu.ch> Reviewed-by: Andreas Fernandez <typo3@scripting-base.de> Tested-by: Andreas Fernandez <typo3@scripting-base.de> --- .../Tests/Unit/Session/Backend/RedisSessionBackendTest.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/typo3/sysext/core/Tests/Unit/Session/Backend/RedisSessionBackendTest.php b/typo3/sysext/core/Tests/Unit/Session/Backend/RedisSessionBackendTest.php index 795ba6105c9e..77941d5943cd 100644 --- a/typo3/sysext/core/Tests/Unit/Session/Backend/RedisSessionBackendTest.php +++ b/typo3/sysext/core/Tests/Unit/Session/Backend/RedisSessionBackendTest.php @@ -23,6 +23,13 @@ use TYPO3\Components\TestingFramework\Core\Unit\UnitTestCase; */ class RedisSessionBackendTest extends UnitTestCase { + protected function setUp() + { + if (!class_exists(\Redis::class)) { + $this->markTestSkipped('Redis class needs to be available to test RedisSessionBackend'); + } + } + /** * @test */ -- GitLab