File tree Expand file tree Collapse file tree 7 files changed +11
-21
lines changed
Expand file tree Collapse file tree 7 files changed +11
-21
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 ;
1514use Symfony \Component \Lock \Exception \InvalidTtlException ;
1615use Symfony \Component \Lock \Key ;
1716use Symfony \Component \Lock \PersistingStoreInterface ;
@@ -31,7 +30,7 @@ class MemcachedStoreTest extends AbstractStoreTestCase
3130 public static function setUpBeforeClass (): void
3231 {
3332 if (version_compare (phpversion ('memcached ' ), '3.1.6 ' , '< ' )) {
34- throw new SkippedTestSuiteError ('Extension memcached > 3.1.5 required. ' );
33+ self :: markTestSkipped ('Extension memcached > 3.1.5 required. ' );
3534 }
3635
3736 $ memcached = new \Memcached ();
@@ -40,7 +39,7 @@ public static function setUpBeforeClass(): void
4039 $ code = $ memcached ->getResultCode ();
4140
4241 if (\Memcached::RES_SUCCESS !== $ code && \Memcached::RES_NOTFOUND !== $ code ) {
43- throw new SkippedTestSuiteError ('Unable to connect to the memcache host ' );
42+ self :: markTestSkipped ('Unable to connect to the memcache host ' );
4443 }
4544 }
4645
Original file line number Diff line number Diff line change 1313
1414use MongoDB \Client ;
1515use MongoDB \Driver \Exception \ConnectionTimeoutException ;
16- use PHPUnit \Framework \SkippedTestSuiteError ;
1716use Symfony \Component \Lock \Exception \InvalidArgumentException ;
1817use Symfony \Component \Lock \Key ;
1918use Symfony \Component \Lock \PersistingStoreInterface ;
@@ -33,14 +32,14 @@ class MongoDbStoreTest extends AbstractStoreTestCase
3332 public static function setupBeforeClass (): void
3433 {
3534 if (!class_exists (\MongoDB \Client::class)) {
36- throw new SkippedTestSuiteError ('The mongodb/mongodb package is required. ' );
35+ self :: markTestSkipped ('The mongodb/mongodb package is required. ' );
3736 }
3837
3938 $ client = self ::getMongoClient ();
4039 try {
4140 $ client ->listDatabases ();
4241 } catch (ConnectionTimeoutException $ e ) {
43- throw new SkippedTestSuiteError ('MongoDB server not found. ' );
42+ self :: markTestSkipped ('MongoDB server not found. ' );
4443 }
4544 }
4645
Original file line number Diff line number Diff line change 1111
1212namespace Symfony \Component \Lock \Tests \Store ;
1313
14- use PHPUnit \Framework \SkippedTestSuiteError ;
15-
1614/**
1715 * @author Jérémy Derussé <jeremy@derusse.com>
1816 *
@@ -26,7 +24,7 @@ public static function setUpBeforeClass(): void
2624 try {
2725 $ redis ->connect ();
2826 } catch (\Exception $ e ) {
29- throw new SkippedTestSuiteError ($ e ->getMessage ());
27+ self :: markTestSkipped ($ e ->getMessage ());
3028 }
3129 }
3230
Original file line number Diff line number Diff line change 1111
1212namespace Symfony \Component \Lock \Tests \Store ;
1313
14- use PHPUnit \Framework \SkippedTestSuiteError ;
15-
1614/**
1715 * @author Jérémy Derussé <jeremy@derusse.com>
1816 *
@@ -25,12 +23,12 @@ class RedisArrayStoreTest extends AbstractRedisStoreTestCase
2523 public static function setUpBeforeClass (): void
2624 {
2725 if (!class_exists (\RedisArray::class)) {
28- throw new SkippedTestSuiteError ('The RedisArray class is required. ' );
26+ self :: markTestSkipped ('The RedisArray class is required. ' );
2927 }
3028 try {
3129 (new \Redis ())->connect (...explode (': ' , getenv ('REDIS_HOST ' )));
3230 } catch (\Exception $ e ) {
33- throw new SkippedTestSuiteError ($ e ->getMessage ());
31+ self :: markTestSkipped ($ e ->getMessage ());
3432 }
3533 }
3634
Original file line number Diff line number Diff line change 1111
1212namespace Symfony \Component \Lock \Tests \Store ;
1313
14- use PHPUnit \Framework \SkippedTestSuiteError ;
15-
1614/**
1715 * @author Jérémy Derussé <jeremy@derusse.com>
1816 *
@@ -25,10 +23,10 @@ class RedisClusterStoreTest extends AbstractRedisStoreTestCase
2523 public static function setUpBeforeClass (): void
2624 {
2725 if (!class_exists (\RedisCluster::class)) {
28- throw new SkippedTestSuiteError ('The RedisCluster class is required. ' );
26+ self :: markTestSkipped ('The RedisCluster class is required. ' );
2927 }
3028 if (!getenv ('REDIS_CLUSTER_HOSTS ' )) {
31- throw new SkippedTestSuiteError ('REDIS_CLUSTER_HOSTS env var is not defined. ' );
29+ self :: markTestSkipped ('REDIS_CLUSTER_HOSTS env var is not defined. ' );
3230 }
3331 }
3432
Original file line number Diff line number Diff line change 1111
1212namespace Symfony \Component \Lock \Tests \Store ;
1313
14- use PHPUnit \Framework \SkippedTestSuiteError ;
1514use Symfony \Component \Lock \Exception \InvalidTtlException ;
1615use Symfony \Component \Lock \Store \RedisStore ;
1716
@@ -31,7 +30,7 @@ public static function setUpBeforeClass(): void
3130 try {
3231 (new \Redis ())->connect (...explode (': ' , getenv ('REDIS_HOST ' )));
3332 } catch (\Exception $ e ) {
34- throw new SkippedTestSuiteError ($ e ->getMessage ());
33+ self :: markTestSkipped ($ e ->getMessage ());
3534 }
3635 }
3736
Original file line number Diff line number Diff line change 1111
1212namespace Store ;
1313
14- use PHPUnit \Framework \SkippedTestSuiteError ;
1514use Relay \Relay ;
1615use Symfony \Component \Lock \Tests \Store \AbstractRedisStoreTestCase ;
1716use Symfony \Component \Lock \Tests \Store \SharedLockStoreTestTrait ;
@@ -30,7 +29,7 @@ public static function setUpBeforeClass(): void
3029 try {
3130 new Relay (...explode (': ' , getenv ('REDIS_HOST ' )));
3231 } catch (\Relay \Exception $ e ) {
33- throw new SkippedTestSuiteError ($ e ->getMessage ());
32+ self :: markTestSkipped ($ e ->getMessage ());
3433 }
3534 }
3635
You can’t perform that action at this time.
0 commit comments