From a66be336e050622c6496c0b5aa40384c361d83c5 Mon Sep 17 00:00:00 2001 From: Michael Kersten Date: Sat, 4 Aug 2018 09:19:43 +0200 Subject: [PATCH] [TASK] Switch skip condition with annotations in RedisBackendTest Use requires annotation for skipping test if php extension redis is not loaded. Resolves: #85748 Releases: master Change-Id: I587d2e6f9928defef9417c44358cc6816345caf3 Reviewed-on: https://review.typo3.org/57795 Tested-by: TYPO3com Reviewed-by: Anja Leichsenring Tested-by: Anja Leichsenring Reviewed-by: Tymoteusz Motylewski Tested-by: Tymoteusz Motylewski --- Build/Scripts/annotationChecker.php | 2 +- .../core/Tests/Functional/Cache/Backend/RedisBackendTest.php | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/Build/Scripts/annotationChecker.php b/Build/Scripts/annotationChecker.php index c70c714ff06a..4e89a94091f3 100755 --- a/Build/Scripts/annotationChecker.php +++ b/Build/Scripts/annotationChecker.php @@ -57,7 +57,7 @@ class NodeVisitor extends NodeVisitorAbstract // PHPDocumentor 2 tags 'api', 'author', 'category', 'copyright', 'deprecated', 'example', 'filesource', 'global', 'ignore', 'internal', 'license', 'link', 'method', 'package', 'param', 'property', 'property-read', 'property-write', 'return', 'see', 'since', 'source', 'subpackage', 'throws', 'todo', 'TODO', 'usedby', 'uses', 'var', 'version', // PHPUnit tags - 'codeCoverageIgnore', 'codeCoverageIgnoreStart', 'codeCoverageIgnoreEnd', 'test', 'covers', 'dataProvider', 'group', 'skip', 'depends', 'expectedException', 'before', + 'codeCoverageIgnore', 'codeCoverageIgnoreStart', 'codeCoverageIgnoreEnd', 'test', 'covers', 'dataProvider', 'group', 'skip', 'depends', 'expectedException', 'before', 'requires', // codeception tags 'env', // PHPCheckStyle diff --git a/typo3/sysext/core/Tests/Functional/Cache/Backend/RedisBackendTest.php b/typo3/sysext/core/Tests/Functional/Cache/Backend/RedisBackendTest.php index 45f41a2e4fb9..337850358766 100644 --- a/typo3/sysext/core/Tests/Functional/Cache/Backend/RedisBackendTest.php +++ b/typo3/sysext/core/Tests/Functional/Cache/Backend/RedisBackendTest.php @@ -24,6 +24,8 @@ use TYPO3\TestingFramework\Core\Functional\FunctionalTestCase; * Warning: * These functional tests use and flush redis database numbers 0 and 1 on the * redis host specified by environment variable typo3RedisHost + * + * @requires extension redis */ class RedisBackendTest extends FunctionalTestCase { @@ -34,9 +36,6 @@ class RedisBackendTest extends FunctionalTestCase { // Note this functional does NOT call parent::setUp() since it does // not need a full blown instance and database - if (!extension_loaded('redis')) { - $this->markTestSkipped('redis extension was not available'); - } if (!getenv('typo3TestingRedisHost')) { $this->markTestSkipped('environment variable "typo3TestingRedisHost" must be set to run this test'); } -- 2.20.1