Skip to content

Commit 04cbdd6

Browse files
digilistnicolas-grekas
authored andcommitted
Replace usages of SkippedTestSuiteError with markTestSkipped() call
1 parent 35079c0 commit 04cbdd6

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

Tests/HttpClientTestCase.php

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

1212
namespace Symfony\Component\HttpClient\Tests;
1313

14-
use PHPUnit\Framework\SkippedTestSuiteError;
1514
use Symfony\Component\HttpClient\Exception\ClientException;
1615
use Symfony\Component\HttpClient\Exception\TransportException;
1716
use Symfony\Component\HttpClient\Internal\ClientState;
@@ -318,7 +317,7 @@ private static function startVulcain(HttpClientInterface $client)
318317
}
319318

320319
if ('\\' === \DIRECTORY_SEPARATOR) {
321-
throw new SkippedTestSuiteError('Testing with the "vulcain" is not supported on Windows.');
320+
self::markTestSkipped('Testing with the "vulcain" is not supported on Windows.');
322321
}
323322

324323
$process = new Process(['vulcain'], null, [
@@ -335,14 +334,14 @@ private static function startVulcain(HttpClientInterface $client)
335334

336335
if (!$process->isRunning()) {
337336
if ('\\' !== \DIRECTORY_SEPARATOR && 127 === $process->getExitCode()) {
338-
throw new SkippedTestSuiteError('vulcain binary is missing');
337+
self::markTestSkipped('vulcain binary is missing');
339338
}
340339

341340
if ('\\' !== \DIRECTORY_SEPARATOR && 126 === $process->getExitCode()) {
342-
throw new SkippedTestSuiteError('vulcain binary is not executable');
341+
self::markTestSkipped('vulcain binary is not executable');
343342
}
344343

345-
throw new SkippedTestSuiteError((new ProcessFailedException($process))->getMessage());
344+
self::markTestSkipped((new ProcessFailedException($process))->getMessage());
346345
}
347346

348347
self::$vulcainStarted = true;

0 commit comments

Comments
 (0)