Skip to content

Commit 54b6dd6

Browse files
Merge branch '4.4' into 5.2
* 4.4: Fix SkippedTestSuite [Console] Fix type annotation on InputInterface::hasArgument() Revert "minor #41949 [Console] fix type annotations on InputInterface (nicolas-grekas)" [EventDispatcher] Correct the called event listener method case Add missing translations for Japanese. Revert "bug #41952 [Console] fix handling positional arguments (nicolas-grekas)" [Security] Don't skip UserPasswordValidatorTest [DI] CS fix [Console] fix handling positional arguments [Validator] add translation for Vietnamese Add Bulgarian translation for the validator
2 parents 1ddcad6 + 246f802 commit 54b6dd6

File tree

6 files changed

+18
-9
lines changed

6 files changed

+18
-9
lines changed

Tests/Store/MemcachedStoreTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
namespace Symfony\Component\Lock\Tests\Store;
1313

14+
use PHPUnit\Framework\SkippedTestSuiteError;
1415
use Symfony\Component\Lock\Exception\InvalidTtlException;
1516
use Symfony\Component\Lock\Key;
1617
use 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

Tests/Store/MongoDbStoreTest.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313

1414
use MongoDB\Client;
1515
use MongoDB\Driver\Exception\ConnectionTimeoutException;
16+
use PHPUnit\Framework\SkippedTestSuiteError;
1617
use Symfony\Component\Lock\Exception\InvalidArgumentException;
1718
use Symfony\Component\Lock\Key;
1819
use 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

Tests/Store/PredisStoreTest.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111

1212
namespace 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

Tests/Store/RedisArrayStoreTest.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111

1212
namespace 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

Tests/Store/RedisClusterStoreTest.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111

1212
namespace 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

Tests/Store/RedisStoreTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
namespace Symfony\Component\Lock\Tests\Store;
1313

14+
use PHPUnit\Framework\SkippedTestSuiteError;
1415
use Symfony\Component\Lock\Exception\InvalidTtlException;
1516
use 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

0 commit comments

Comments
 (0)