Skip to content

Commit f2ab4ac

Browse files
digilistnicolas-grekas
authored andcommitted
Replace usages of SkippedTestSuiteError with markTestSkipped() call
1 parent 563abd8 commit f2ab4ac

File tree

3 files changed

+4
-8
lines changed

3 files changed

+4
-8
lines changed

Tests/ResponseFunctionalTest.php

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

1212
namespace Symfony\Component\HttpFoundation\Tests;
1313

14-
use PHPUnit\Framework\SkippedTestSuiteError;
1514
use PHPUnit\Framework\TestCase;
1615

1716
class ResponseFunctionalTest extends TestCase
@@ -26,7 +25,7 @@ public static function setUpBeforeClass(): void
2625
2 => ['file', '/dev/null', 'w'],
2726
];
2827
if (!self::$server = @proc_open('exec '.\PHP_BINARY.' -S localhost:8054', $spec, $pipes, __DIR__.'/Fixtures/response-functional')) {
29-
throw new SkippedTestSuiteError('PHP server unable to start.');
28+
self::markTestSkipped('PHP server unable to start.');
3029
}
3130
sleep(1);
3231
}

Tests/Session/Storage/Handler/AbstractSessionHandlerTest.php

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

1212
namespace Symfony\Component\HttpFoundation\Tests\Session\Storage\Handler;
1313

14-
use PHPUnit\Framework\SkippedTestSuiteError;
1514
use PHPUnit\Framework\TestCase;
1615

1716
class AbstractSessionHandlerTest extends TestCase
@@ -26,7 +25,7 @@ public static function setUpBeforeClass(): void
2625
2 => ['file', '/dev/null', 'w'],
2726
];
2827
if (!self::$server = @proc_open('exec '.\PHP_BINARY.' -S localhost:8053', $spec, $pipes, __DIR__.'/Fixtures')) {
29-
throw new SkippedTestSuiteError('PHP server unable to start.');
28+
self::markTestSkipped('PHP server unable to start.');
3029
}
3130
sleep(1);
3231
}

Tests/Session/Storage/Handler/RedisClusterSessionHandlerTest.php

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

1212
namespace Symfony\Component\HttpFoundation\Tests\Session\Storage\Handler;
1313

14-
use PHPUnit\Framework\SkippedTestSuiteError;
15-
1614
/**
1715
* @group integration
1816
*/
@@ -21,11 +19,11 @@ class RedisClusterSessionHandlerTest extends AbstractRedisSessionHandlerTestCase
2119
public static function setUpBeforeClass(): void
2220
{
2321
if (!class_exists(\RedisCluster::class)) {
24-
throw new SkippedTestSuiteError('The RedisCluster class is required.');
22+
self::markTestSkipped('The RedisCluster class is required.');
2523
}
2624

2725
if (!$hosts = getenv('REDIS_CLUSTER_HOSTS')) {
28-
throw new SkippedTestSuiteError('REDIS_CLUSTER_HOSTS env var is not defined.');
26+
self::markTestSkipped('REDIS_CLUSTER_HOSTS env var is not defined.');
2927
}
3028
}
3129

0 commit comments

Comments
 (0)