From 36ca4265598fd2fdba10b7c6ae42523b31a9ca11 Mon Sep 17 00:00:00 2001 From: Christophe Coevoet Date: Mon, 12 Jun 2023 10:30:21 +0200 Subject: [PATCH] Implement the test skipping for unsupported tests --- tests/AbstractBrowserKitConfig.php | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/tests/AbstractBrowserKitConfig.php b/tests/AbstractBrowserKitConfig.php index b773494..1003eed 100644 --- a/tests/AbstractBrowserKitConfig.php +++ b/tests/AbstractBrowserKitConfig.php @@ -2,6 +2,9 @@ namespace Behat\Mink\Tests\Driver; +use Behat\Mink\Tests\Driver\Basic\IFrameTest; +use Behat\Mink\Tests\Driver\Basic\ScreenshotTest; + abstract class AbstractBrowserKitConfig extends AbstractConfig { public static function getInstance() @@ -9,6 +12,19 @@ public static function getInstance() return new static(); } + public function skipMessage($testCase, $test): ?string + { + if ($testCase === IFrameTest::class) { + return 'iFrames management is not supported.'; + } + + if ($testCase === ScreenshotTest::class) { + return 'Screenshots are not supported.'; + } + + return parent::skipMessage($testCase, $test); + } + protected function supportsJs() { return false;