File tree Expand file tree Collapse file tree 6 files changed +18
-9
lines changed
Expand file tree Collapse file tree 6 files changed +18
-9
lines changed Original file line number Diff line number Diff line change 1111
1212namespace Symfony \Component \Lock \Tests \Store ;
1313
14+ use PHPUnit \Framework \SkippedTestSuiteError ;
1415use Symfony \Component \Lock \Exception \InvalidTtlException ;
1516use Symfony \Component \Lock \Key ;
1617use Symfony \Component \Lock \PersistingStoreInterface ;
@@ -34,7 +35,7 @@ public static function setUpBeforeClass(): void
3435 $ code = $ memcached ->getResultCode ();
3536
3637 if (\Memcached::RES_SUCCESS !== $ code && \Memcached::RES_NOTFOUND !== $ code ) {
37- self :: markTestSkipped ('Unable to connect to the memcache host ' );
38+ throw new SkippedTestSuiteError ('Unable to connect to the memcache host ' );
3839 }
3940 }
4041
Original file line number Diff line number Diff line change 1313
1414use MongoDB \Client ;
1515use MongoDB \Driver \Exception \ConnectionTimeoutException ;
16+ use PHPUnit \Framework \SkippedTestSuiteError ;
1617use Symfony \Component \Lock \Exception \InvalidArgumentException ;
1718use Symfony \Component \Lock \Key ;
1819use Symfony \Component \Lock \PersistingStoreInterface ;
@@ -31,14 +32,14 @@ class MongoDbStoreTest extends AbstractStoreTest
3132 public static function setupBeforeClass (): void
3233 {
3334 if (!class_exists (\MongoDB \Client::class)) {
34- self :: markTestSkipped ('The mongodb/mongodb package is required. ' );
35+ throw new SkippedTestSuiteError ('The mongodb/mongodb package is required. ' );
3536 }
3637
3738 $ client = self ::getMongoClient ();
3839 try {
3940 $ client ->listDatabases ();
4041 } catch (ConnectionTimeoutException $ e ) {
41- self :: markTestSkipped ('MongoDB server not found. ' );
42+ throw new SkippedTestSuiteError ('MongoDB server not found. ' );
4243 }
4344 }
4445
Original file line number Diff line number Diff line change 1111
1212namespace Symfony \Component \Lock \Tests \Store ;
1313
14+ use PHPUnit \Framework \SkippedTestSuiteError ;
15+
1416/**
1517 * @author Jérémy Derussé <jeremy@derusse.com>
1618 * @group integration
@@ -23,7 +25,7 @@ public static function setUpBeforeClass(): void
2325 try {
2426 $ redis ->connect ();
2527 } catch (\Exception $ e ) {
26- self :: markTestSkipped ($ e ->getMessage ());
28+ throw new SkippedTestSuiteError ($ e ->getMessage ());
2729 }
2830 }
2931
Original file line number Diff line number Diff line change 1111
1212namespace Symfony \Component \Lock \Tests \Store ;
1313
14+ use PHPUnit \Framework \SkippedTestSuiteError ;
15+
1416/**
1517 * @author Jérémy Derussé <jeremy@derusse.com>
1618 *
@@ -22,12 +24,12 @@ class RedisArrayStoreTest extends AbstractRedisStoreTest
2224 public static function setUpBeforeClass (): void
2325 {
2426 if (!class_exists (\RedisArray::class)) {
25- self :: markTestSkipped ('The RedisArray class is required. ' );
27+ throw new SkippedTestSuiteError ('The RedisArray class is required. ' );
2628 }
2729 try {
2830 (new \Redis ())->connect (getenv ('REDIS_HOST ' ));
2931 } catch (\Exception $ e ) {
30- self :: markTestSkipped ($ e ->getMessage ());
32+ throw new SkippedTestSuiteError ($ e ->getMessage ());
3133 }
3234 }
3335
Original file line number Diff line number Diff line change 1111
1212namespace Symfony \Component \Lock \Tests \Store ;
1313
14+ use PHPUnit \Framework \SkippedTestSuiteError ;
15+
1416/**
1517 * @author Jérémy Derussé <jeremy@derusse.com>
1618 *
@@ -22,10 +24,10 @@ class RedisClusterStoreTest extends AbstractRedisStoreTest
2224 public static function setUpBeforeClass (): void
2325 {
2426 if (!class_exists (\RedisCluster::class)) {
25- self :: markTestSkipped ('The RedisCluster class is required. ' );
27+ throw new SkippedTestSuiteError ('The RedisCluster class is required. ' );
2628 }
2729 if (!getenv ('REDIS_CLUSTER_HOSTS ' )) {
28- self :: markTestSkipped ('REDIS_CLUSTER_HOSTS env var is not defined. ' );
30+ throw new SkippedTestSuiteError ('REDIS_CLUSTER_HOSTS env var is not defined. ' );
2931 }
3032 }
3133
Original file line number Diff line number Diff line change 1111
1212namespace Symfony \Component \Lock \Tests \Store ;
1313
14+ use PHPUnit \Framework \SkippedTestSuiteError ;
1415use Symfony \Component \Lock \Exception \InvalidTtlException ;
1516use Symfony \Component \Lock \Store \RedisStore ;
1617
@@ -29,7 +30,7 @@ public static function setUpBeforeClass(): void
2930 try {
3031 (new \Redis ())->connect (getenv ('REDIS_HOST ' ));
3132 } catch (\Exception $ e ) {
32- self :: markTestSkipped ($ e ->getMessage ());
33+ throw new SkippedTestSuiteError ($ e ->getMessage ());
3334 }
3435 }
3536
You can’t perform that action at this time.
0 commit comments