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 11
11
12
12
namespace Symfony \Component \Lock \Tests \Store ;
13
13
14
- use PHPUnit \Framework \SkippedTestSuiteError ;
15
14
use Symfony \Component \Lock \Exception \InvalidTtlException ;
16
15
use Symfony \Component \Lock \Key ;
17
16
use Symfony \Component \Lock \PersistingStoreInterface ;
@@ -31,7 +30,7 @@ class MemcachedStoreTest extends AbstractStoreTestCase
31
30
public static function setUpBeforeClass (): void
32
31
{
33
32
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. ' );
35
34
}
36
35
37
36
$ memcached = new \Memcached ();
@@ -40,7 +39,7 @@ public static function setUpBeforeClass(): void
40
39
$ code = $ memcached ->getResultCode ();
41
40
42
41
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 ' );
44
43
}
45
44
}
46
45
Original file line number Diff line number Diff line change 13
13
14
14
use MongoDB \Client ;
15
15
use MongoDB \Driver \Exception \ConnectionTimeoutException ;
16
- use PHPUnit \Framework \SkippedTestSuiteError ;
17
16
use Symfony \Component \Lock \Exception \InvalidArgumentException ;
18
17
use Symfony \Component \Lock \Key ;
19
18
use Symfony \Component \Lock \PersistingStoreInterface ;
@@ -33,14 +32,14 @@ class MongoDbStoreTest extends AbstractStoreTestCase
33
32
public static function setupBeforeClass (): void
34
33
{
35
34
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. ' );
37
36
}
38
37
39
38
$ client = self ::getMongoClient ();
40
39
try {
41
40
$ client ->listDatabases ();
42
41
} catch (ConnectionTimeoutException $ e ) {
43
- throw new SkippedTestSuiteError ('MongoDB server not found. ' );
42
+ self :: markTestSkipped ('MongoDB server not found. ' );
44
43
}
45
44
}
46
45
Original file line number Diff line number Diff line change 11
11
12
12
namespace Symfony \Component \Lock \Tests \Store ;
13
13
14
- use PHPUnit \Framework \SkippedTestSuiteError ;
15
-
16
14
/**
17
15
* @author Jérémy Derussé <jeremy@derusse.com>
18
16
*
@@ -26,7 +24,7 @@ public static function setUpBeforeClass(): void
26
24
try {
27
25
$ redis ->connect ();
28
26
} catch (\Exception $ e ) {
29
- throw new SkippedTestSuiteError ($ e ->getMessage ());
27
+ self :: markTestSkipped ($ e ->getMessage ());
30
28
}
31
29
}
32
30
Original file line number Diff line number Diff line change 11
11
12
12
namespace Symfony \Component \Lock \Tests \Store ;
13
13
14
- use PHPUnit \Framework \SkippedTestSuiteError ;
15
-
16
14
/**
17
15
* @author Jérémy Derussé <jeremy@derusse.com>
18
16
*
@@ -25,12 +23,12 @@ class RedisArrayStoreTest extends AbstractRedisStoreTestCase
25
23
public static function setUpBeforeClass (): void
26
24
{
27
25
if (!class_exists (\RedisArray::class)) {
28
- throw new SkippedTestSuiteError ('The RedisArray class is required. ' );
26
+ self :: markTestSkipped ('The RedisArray class is required. ' );
29
27
}
30
28
try {
31
29
(new \Redis ())->connect (...explode (': ' , getenv ('REDIS_HOST ' )));
32
30
} catch (\Exception $ e ) {
33
- throw new SkippedTestSuiteError ($ e ->getMessage ());
31
+ self :: markTestSkipped ($ e ->getMessage ());
34
32
}
35
33
}
36
34
Original file line number Diff line number Diff line change 11
11
12
12
namespace Symfony \Component \Lock \Tests \Store ;
13
13
14
- use PHPUnit \Framework \SkippedTestSuiteError ;
15
-
16
14
/**
17
15
* @author Jérémy Derussé <jeremy@derusse.com>
18
16
*
@@ -25,10 +23,10 @@ class RedisClusterStoreTest extends AbstractRedisStoreTestCase
25
23
public static function setUpBeforeClass (): void
26
24
{
27
25
if (!class_exists (\RedisCluster::class)) {
28
- throw new SkippedTestSuiteError ('The RedisCluster class is required. ' );
26
+ self :: markTestSkipped ('The RedisCluster class is required. ' );
29
27
}
30
28
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. ' );
32
30
}
33
31
}
34
32
Original file line number Diff line number Diff line change 11
11
12
12
namespace Symfony \Component \Lock \Tests \Store ;
13
13
14
- use PHPUnit \Framework \SkippedTestSuiteError ;
15
14
use Symfony \Component \Lock \Exception \InvalidTtlException ;
16
15
use Symfony \Component \Lock \Store \RedisStore ;
17
16
@@ -31,7 +30,7 @@ public static function setUpBeforeClass(): void
31
30
try {
32
31
(new \Redis ())->connect (...explode (': ' , getenv ('REDIS_HOST ' )));
33
32
} catch (\Exception $ e ) {
34
- throw new SkippedTestSuiteError ($ e ->getMessage ());
33
+ self :: markTestSkipped ($ e ->getMessage ());
35
34
}
36
35
}
37
36
Original file line number Diff line number Diff line change 11
11
12
12
namespace Store ;
13
13
14
- use PHPUnit \Framework \SkippedTestSuiteError ;
15
14
use Relay \Relay ;
16
15
use Symfony \Component \Lock \Tests \Store \AbstractRedisStoreTestCase ;
17
16
use Symfony \Component \Lock \Tests \Store \SharedLockStoreTestTrait ;
@@ -30,7 +29,7 @@ public static function setUpBeforeClass(): void
30
29
try {
31
30
new Relay (...explode (': ' , getenv ('REDIS_HOST ' )));
32
31
} catch (\Relay \Exception $ e ) {
33
- throw new SkippedTestSuiteError ($ e ->getMessage ());
32
+ self :: markTestSkipped ($ e ->getMessage ());
34
33
}
35
34
}
36
35
You can’t perform that action at this time.
0 commit comments