1111
1212namespace Symfony \Component \HttpClient \Tests ;
1313
14+ use PHPUnit \Framework \SkippedTestSuiteError ;
1415use Symfony \Component \HttpClient \Exception \ClientException ;
1516use Symfony \Component \HttpClient \Exception \TransportException ;
1617use Symfony \Component \HttpClient \Internal \ClientState ;
@@ -295,11 +296,11 @@ private static function startVulcain(HttpClientInterface $client)
295296 }
296297
297298 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. ' );
299300 }
300301
301302 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 ' );
303304 }
304305
305306 $ process = new Process (['vulcain ' ], null , [
@@ -316,14 +317,14 @@ private static function startVulcain(HttpClientInterface $client)
316317
317318 if (!$ process ->isRunning ()) {
318319 if ('\\' !== \DIRECTORY_SEPARATOR && 127 === $ process ->getExitCode ()) {
319- self :: markTestSkipped ('vulcain binary is missing ' );
320+ throw new SkippedTestSuiteError ('vulcain binary is missing ' );
320321 }
321322
322323 if ('\\' !== \DIRECTORY_SEPARATOR && 126 === $ process ->getExitCode ()) {
323- self :: markTestSkipped ('vulcain binary is not executable ' );
324+ throw new SkippedTestSuiteError ('vulcain binary is not executable ' );
324325 }
325326
326- self :: markTestSkipped ((new ProcessFailedException ($ process ))->getMessage ());
327+ throw new SkippedTestSuiteError ((new ProcessFailedException ($ process ))->getMessage ());
327328 }
328329
329330 self ::$ vulcainStarted = true ;
0 commit comments