Skip to content

Commit

Permalink
Merge pull request #168 from stof/update_testsuite
Browse files Browse the repository at this point in the history
Implement the test skipping for unsupported tests
  • Loading branch information
stof committed Jun 12, 2023
2 parents fedfa4b + 36ca426 commit 808d58d
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions tests/AbstractBrowserKitConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,29 @@

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()
{
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;
Expand Down

0 comments on commit 808d58d

Please sign in to comment.