Skip to content

Commit

Permalink
Fix SkippedTestSuite
Browse files Browse the repository at this point in the history
  • Loading branch information
jderusse authored and fabpot committed Jul 4, 2021
1 parent 605a05b commit 48f7bed
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
3 changes: 2 additions & 1 deletion Tests/ResponseFunctionalTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

namespace Symfony\Component\HttpFoundation\Tests;

use PHPUnit\Framework\SkippedTestSuiteError;
use PHPUnit\Framework\TestCase;

class ResponseFunctionalTest extends TestCase
Expand All @@ -24,7 +25,7 @@ public static function setUpBeforeClass(): void
2 => ['file', '/dev/null', 'w'],
];
if (!self::$server = @proc_open('exec '.\PHP_BINARY.' -S localhost:8054', $spec, $pipes, __DIR__.'/Fixtures/response-functional')) {
self::markTestSkipped('PHP server unable to start.');
throw new SkippedTestSuiteError('PHP server unable to start.');
}
sleep(1);
}
Expand Down
3 changes: 2 additions & 1 deletion Tests/Session/Storage/Handler/AbstractSessionHandlerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

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

use PHPUnit\Framework\SkippedTestSuiteError;
use PHPUnit\Framework\TestCase;

class AbstractSessionHandlerTest extends TestCase
Expand All @@ -24,7 +25,7 @@ public static function setUpBeforeClass(): void
2 => ['file', '/dev/null', 'w'],
];
if (!self::$server = @proc_open('exec '.\PHP_BINARY.' -S localhost:8053', $spec, $pipes, __DIR__.'/Fixtures')) {
self::markTestSkipped('PHP server unable to start.');
throw new SkippedTestSuiteError('PHP server unable to start.');
}
sleep(1);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@

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

use PHPUnit\Framework\SkippedTestSuiteError;

/**
* @group integration
*/
Expand All @@ -19,11 +21,11 @@ class RedisClusterSessionHandlerTest extends AbstractRedisSessionHandlerTestCase
public static function setUpBeforeClass(): void
{
if (!class_exists(\RedisCluster::class)) {
self::markTestSkipped('The RedisCluster class is required.');
throw new SkippedTestSuiteError('The RedisCluster class is required.');
}

if (!$hosts = getenv('REDIS_CLUSTER_HOSTS')) {
self::markTestSkipped('REDIS_CLUSTER_HOSTS env var is not defined.');
throw new SkippedTestSuiteError('REDIS_CLUSTER_HOSTS env var is not defined.');
}
}

Expand Down

0 comments on commit 48f7bed

Please sign in to comment.