11
11
12
12
namespace Symfony \Component \HttpClient \Tests ;
13
13
14
+ use PHPUnit \Framework \SkippedTestSuiteError ;
14
15
use Symfony \Component \HttpClient \Exception \ClientException ;
15
16
use Symfony \Component \HttpClient \Exception \TransportException ;
16
17
use Symfony \Component \HttpClient \Internal \ClientState ;
@@ -295,11 +296,11 @@ private static function startVulcain(HttpClientInterface $client)
295
296
}
296
297
297
298
if ('\\' === \DIRECTORY_SEPARATOR ) {
298
- self :: markTestSkipped ('Testing with the "vulcain" is not supported on Windows. ' );
299
+ throw new SkippedTestSuiteError ('Testing with the "vulcain" is not supported on Windows. ' );
299
300
}
300
301
301
302
if (['application/json ' ] !== $ client ->request ('GET ' , 'http://127.0.0.1:8057/json ' )->getHeaders ()['content-type ' ]) {
302
- self :: markTestSkipped ('symfony/http-client-contracts >= 2.0.1 required ' );
303
+ throw new SkippedTestSuiteError ('symfony/http-client-contracts >= 2.0.1 required ' );
303
304
}
304
305
305
306
$ process = new Process (['vulcain ' ], null , [
@@ -316,14 +317,14 @@ private static function startVulcain(HttpClientInterface $client)
316
317
317
318
if (!$ process ->isRunning ()) {
318
319
if ('\\' !== \DIRECTORY_SEPARATOR && 127 === $ process ->getExitCode ()) {
319
- self :: markTestSkipped ('vulcain binary is missing ' );
320
+ throw new SkippedTestSuiteError ('vulcain binary is missing ' );
320
321
}
321
322
322
323
if ('\\' !== \DIRECTORY_SEPARATOR && 126 === $ process ->getExitCode ()) {
323
- self :: markTestSkipped ('vulcain binary is not executable ' );
324
+ throw new SkippedTestSuiteError ('vulcain binary is not executable ' );
324
325
}
325
326
326
- self :: markTestSkipped ((new ProcessFailedException ($ process ))->getMessage ());
327
+ throw new SkippedTestSuiteError ((new ProcessFailedException ($ process ))->getMessage ());
327
328
}
328
329
329
330
self ::$ vulcainStarted = true ;
0 commit comments