8000 Fix SkippedTestSuite · symfony/http-foundation@48f7bed · GitHub
[go: up one dir, main page]

Skip to content

Commit 48f7bed

Browse files
jderussefabpot
authored andcommitted
Fix SkippedTestSuite
1 parent 605a05b commit 48f7bed

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

Tests/ResponseFunctionalTest.php

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

1212
namespace Symfony\Component\HttpFoundation\Tests;
1313

14+
use PHPUnit\Framework\SkippedTestSuiteError;
1415
use PHPUnit\Framework\TestCase;
1516

1617
class ResponseFunctionalTest extends TestCase
@@ -24,7 +25,7 @@ public static function setUpBeforeClass(): void
2425
2 => ['file', '/dev/null', 'w'],
2526
];
2627
if (!self::$server = @proc_open('exec '.\PHP_BINARY.' -S localhost:8054', $spec, $pipes, __DIR__.'/Fixtures/response-functional')) {
27-
self::markTestSkipped('PHP server unable to start.');
28+
throw new SkippedTestSuiteError('PHP server unable to start.');
2829
}
2930
sleep(1);
3031
}

Tests/Session/Storage/Handler/AbstractSessionHandlerTest.php

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

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

14+
use PHPUnit\Framework\SkippedTestSuiteError;
1415
use PHPUnit\Framework\TestCase;
1516

1617
class AbstractSessionHandlerTest extends TestCase
@@ -24,7 +25,7 @@ public static function setUpBeforeClass(): void
2425
2 => ['file', '/dev/null', 'w'],
2526
];
2627
if (!self::$server = @proc_open('exec '.\PHP_BINARY.' -S localhost:8053', $spec, $pipes, __DIR__.'/Fixtures')) {
27-
self::markTestSkipped('PHP server unable to start.');
28+
throw new SkippedTestSuiteError('PHP server unable to start.');
2829
}
2930
sleep(1);
3031
}

Tests/Session/Storage/Handler/RedisClusterSessionHandlerTest.php

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

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

14+
use PHPUnit\Framework\SkippedTestSuiteError;
15+
1416
/**
1517
* @group integration
1618
*/
@@ -19,11 +21,11 @@ class RedisClusterSessionHandlerTest extends AbstractRedisSessionHandlerTestCase
1921
public static function setUpBeforeClass(): void
2022
{
2123
if (!class_exists(\RedisCluster::class)) {
22-
self::markTestSkipped('The RedisCluster class is required.');
24+
throw new SkippedTestSuiteError('The RedisCluster class is required.');
2325
}
2426

2527
if (!$hosts = getenv('REDIS_CLUSTER_HOSTS')) {
26-
self::markTestSkipped('REDIS_CLUSTER_HOSTS env var is not defined.');
28+
throw new SkippedTestSuiteError('REDIS_CLUSTER_HOSTS env var is not defined.');
2729
}
2830
}
2931

0 commit comments

Comments
 (0)
0