From 03a23c8323af3595d648b5983a135d0e4d050316 Mon Sep 17 00:00:00 2001 From: Christophe Coevoet Date: Tue, 14 Feb 2023 18:21:08 +0100 Subject: [PATCH 1/2] Make all share tests final Drivers wanting to run custom tests should define them in their own tests. They might also decide to skip some of the shared tests. But there is no reason to customize the shared tests themselves. --- tests/Basic/BasicAuthTest.php | 2 +- tests/Basic/BestPracticesTest.php | 2 +- tests/Basic/ContentTest.php | 2 +- tests/Basic/CookieTest.php | 2 +- tests/Basic/ErrorHandlingTest.php | 2 +- tests/Basic/HeaderTest.php | 2 +- tests/Basic/IFrameTest.php | 2 +- tests/Basic/NavigationTest.php | 2 +- tests/Basic/ScreenshotTest.php | 2 +- tests/Basic/StatusCodeTest.php | 2 +- tests/Basic/TraversingTest.php | 2 +- tests/Basic/VisibilityTest.php | 2 +- tests/Css/HoverTest.php | 2 +- tests/Form/CheckboxTest.php | 2 +- tests/Form/GeneralTest.php | 2 +- tests/Form/Html5Test.php | 2 +- tests/Form/RadioTest.php | 2 +- tests/Form/SelectTest.php | 2 +- tests/Js/ChangeEventTest.php | 2 +- tests/Js/EventsTest.php | 2 +- tests/Js/JavascriptEvaluationTest.php | 2 +- tests/Js/JavascriptTest.php | 2 +- tests/Js/WindowTest.php | 2 +- 23 files changed, 23 insertions(+), 23 deletions(-) diff --git a/tests/Basic/BasicAuthTest.php b/tests/Basic/BasicAuthTest.php index 644cdb3..05956b9 100644 --- a/tests/Basic/BasicAuthTest.php +++ b/tests/Basic/BasicAuthTest.php @@ -4,7 +4,7 @@ use Behat\Mink\Tests\Driver\TestCase; -class BasicAuthTest extends TestCase +final class BasicAuthTest extends TestCase { /** * @dataProvider setBasicAuthDataProvider diff --git a/tests/Basic/BestPracticesTest.php b/tests/Basic/BestPracticesTest.php index 9550276..5d3ecac 100644 --- a/tests/Basic/BestPracticesTest.php +++ b/tests/Basic/BestPracticesTest.php @@ -7,7 +7,7 @@ /** * This testcase ensures that the driver implementation follows recommended practices for drivers. */ -class BestPracticesTest extends TestCase +final class BestPracticesTest extends TestCase { public function testExtendsCoreDriver() { diff --git a/tests/Basic/ContentTest.php b/tests/Basic/ContentTest.php index 19609ec..65131a0 100644 --- a/tests/Basic/ContentTest.php +++ b/tests/Basic/ContentTest.php @@ -4,7 +4,7 @@ use Behat\Mink\Tests\Driver\TestCase; -class ContentTest extends TestCase +final class ContentTest extends TestCase { public function testOuterHtml() { diff --git a/tests/Basic/CookieTest.php b/tests/Basic/CookieTest.php index 80b8999..6dc69a4 100644 --- a/tests/Basic/CookieTest.php +++ b/tests/Basic/CookieTest.php @@ -4,7 +4,7 @@ use Behat\Mink\Tests\Driver\TestCase; -class CookieTest extends TestCase +final class CookieTest extends TestCase { /** * test cookie decoding. diff --git a/tests/Basic/ErrorHandlingTest.php b/tests/Basic/ErrorHandlingTest.php index 5a60f45..85945bf 100644 --- a/tests/Basic/ErrorHandlingTest.php +++ b/tests/Basic/ErrorHandlingTest.php @@ -7,7 +7,7 @@ /** * @group slow */ -class ErrorHandlingTest extends TestCase +final class ErrorHandlingTest extends TestCase { const NOT_FOUND_XPATH = '//html/./invalid'; diff --git a/tests/Basic/HeaderTest.php b/tests/Basic/HeaderTest.php index 895ec9e..2d5bdf9 100644 --- a/tests/Basic/HeaderTest.php +++ b/tests/Basic/HeaderTest.php @@ -4,7 +4,7 @@ use Behat\Mink\Tests\Driver\TestCase; -class HeaderTest extends TestCase +final class HeaderTest extends TestCase { /** * test referrer. diff --git a/tests/Basic/IFrameTest.php b/tests/Basic/IFrameTest.php index 0ed0f9e..4c7c1a0 100644 --- a/tests/Basic/IFrameTest.php +++ b/tests/Basic/IFrameTest.php @@ -4,7 +4,7 @@ use Behat\Mink\Tests\Driver\TestCase; -class IFrameTest extends TestCase +final class IFrameTest extends TestCase { public function testIFrame() { diff --git a/tests/Basic/NavigationTest.php b/tests/Basic/NavigationTest.php index ab5488b..6c67a2c 100644 --- a/tests/Basic/NavigationTest.php +++ b/tests/Basic/NavigationTest.php @@ -5,7 +5,7 @@ use Behat\Mink\Tests\Driver\TestCase; use Yoast\PHPUnitPolyfills\Polyfills\AssertionRenames; -class NavigationTest extends TestCase +final class NavigationTest extends TestCase { use AssertionRenames; diff --git a/tests/Basic/ScreenshotTest.php b/tests/Basic/ScreenshotTest.php index 84f55d0..9fa3f92 100644 --- a/tests/Basic/ScreenshotTest.php +++ b/tests/Basic/ScreenshotTest.php @@ -4,7 +4,7 @@ use Behat\Mink\Tests\Driver\TestCase; -class ScreenshotTest extends TestCase +final class ScreenshotTest extends TestCase { public function testScreenshot() { diff --git a/tests/Basic/StatusCodeTest.php b/tests/Basic/StatusCodeTest.php index 2e69dc7..3fc7715 100644 --- a/tests/Basic/StatusCodeTest.php +++ b/tests/Basic/StatusCodeTest.php @@ -4,7 +4,7 @@ use Behat\Mink\Tests\Driver\TestCase; -class StatusCodeTest extends TestCase +final class StatusCodeTest extends TestCase { public function testStatuses() { diff --git a/tests/Basic/TraversingTest.php b/tests/Basic/TraversingTest.php index bfa6354..d35ee3d 100644 --- a/tests/Basic/TraversingTest.php +++ b/tests/Basic/TraversingTest.php @@ -5,7 +5,7 @@ use Behat\Mink\Tests\Driver\TestCase; use Yoast\PHPUnitPolyfills\Polyfills\AssertionRenames; -class TraversingTest extends TestCase +final class TraversingTest extends TestCase { use AssertionRenames; diff --git a/tests/Basic/VisibilityTest.php b/tests/Basic/VisibilityTest.php index bb5634e..5c33dcb 100644 --- a/tests/Basic/VisibilityTest.php +++ b/tests/Basic/VisibilityTest.php @@ -4,7 +4,7 @@ use Behat\Mink\Tests\Driver\TestCase; -class VisibilityTest extends TestCase +final class VisibilityTest extends TestCase { public function testVisibility() { diff --git a/tests/Css/HoverTest.php b/tests/Css/HoverTest.php index 87041d4..0b3833c 100644 --- a/tests/Css/HoverTest.php +++ b/tests/Css/HoverTest.php @@ -4,7 +4,7 @@ use Behat\Mink\Tests\Driver\TestCase; -class HoverTest extends TestCase +final class HoverTest extends TestCase { /** * @group mouse-events diff --git a/tests/Form/CheckboxTest.php b/tests/Form/CheckboxTest.php index cf0bdd8..f5d0e9d 100644 --- a/tests/Form/CheckboxTest.php +++ b/tests/Form/CheckboxTest.php @@ -4,7 +4,7 @@ use Behat\Mink\Tests\Driver\TestCase; -class CheckboxTest extends TestCase +final class CheckboxTest extends TestCase { public function testManipulate() { diff --git a/tests/Form/GeneralTest.php b/tests/Form/GeneralTest.php index 136974a..613a82b 100644 --- a/tests/Form/GeneralTest.php +++ b/tests/Form/GeneralTest.php @@ -4,7 +4,7 @@ use Behat\Mink\Tests\Driver\TestCase; -class GeneralTest extends TestCase +final class GeneralTest extends TestCase { // test multiple submit buttons public function testIssue212() diff --git a/tests/Form/Html5Test.php b/tests/Form/Html5Test.php index 75cca20..24216e3 100644 --- a/tests/Form/Html5Test.php +++ b/tests/Form/Html5Test.php @@ -4,7 +4,7 @@ use Behat\Mink\Tests\Driver\TestCase; -class Html5Test extends TestCase +final class Html5Test extends TestCase { public function testHtml5FormInputAttribute() { diff --git a/tests/Form/RadioTest.php b/tests/Form/RadioTest.php index fab10f4..d3f381d 100644 --- a/tests/Form/RadioTest.php +++ b/tests/Form/RadioTest.php @@ -4,7 +4,7 @@ use Behat\Mink\Tests\Driver\TestCase; -class RadioTest extends TestCase +final class RadioTest extends TestCase { /** * @before diff --git a/tests/Form/SelectTest.php b/tests/Form/SelectTest.php index 9a491df..96d10f5 100644 --- a/tests/Form/SelectTest.php +++ b/tests/Form/SelectTest.php @@ -4,7 +4,7 @@ use Behat\Mink\Tests\Driver\TestCase; -class SelectTest extends TestCase +final class SelectTest extends TestCase { public function testMultiselect() { diff --git a/tests/Js/ChangeEventTest.php b/tests/Js/ChangeEventTest.php index 8ff837d..26a8504 100644 --- a/tests/Js/ChangeEventTest.php +++ b/tests/Js/ChangeEventTest.php @@ -7,7 +7,7 @@ /** * @group slow */ -class ChangeEventTest extends TestCase +final class ChangeEventTest extends TestCase { /** * 'change' event should be fired after selecting an