Skip to content

Commit 9f2fb57

Browse files
authored
Merge pull request #63 from stof/static_dataproviders
Migrate to static data-providers
2 parents b6e6994 + bc60a1c commit 9f2fb57

23 files changed

Lines changed: 35 additions & 43 deletions

tests/Basic/BasicAuthTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
use Behat\Mink\Tests\Driver\TestCase;
66

7-
class BasicAuthTest extends TestCase
7+
final class BasicAuthTest extends TestCase
88
{
99
/**
1010
* @dataProvider setBasicAuthDataProvider
@@ -20,7 +20,7 @@ public function testSetBasicAuth($user, $pass, $pageText)
2020
$this->assertStringContainsString($pageText, $session->getPage()->getContent());
2121
}
2222

23-
public function setBasicAuthDataProvider()
23+
public static function setBasicAuthDataProvider()
2424
{
2525
return array(
2626
array('mink-user', 'mink-password', 'is authenticated'),

tests/Basic/BestPracticesTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
/**
88
* This testcase ensures that the driver implementation follows recommended practices for drivers.
99
*/
10-
class BestPracticesTest extends TestCase
10+
final class BestPracticesTest extends TestCase
1111
{
1212
public function testExtendsCoreDriver()
1313
{
@@ -40,7 +40,7 @@ public function testImplementBasicApi($method)
4040
$this->assertImplementMethod($method, $driver, 'The driver is unusable when this method is not implemented.');
4141
}
4242

43-
public function provideRequiredMethods()
43+
public static function provideRequiredMethods()
4444
{
4545
return array(
4646
array('start'),

tests/Basic/ContentTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
use Behat\Mink\Tests\Driver\TestCase;
66

7-
class ContentTest extends TestCase
7+
final class ContentTest extends TestCase
88
{
99
public function testOuterHtml()
1010
{
@@ -46,7 +46,7 @@ public function testGetAttribute($attributeName, $attributeValue)
4646
$this->assertSame($attributeValue, $element->getAttribute($attributeName));
4747
}
4848

49-
public function getAttributeDataProvider()
49+
public static function getAttributeDataProvider()
5050
{
5151
return array(
5252
array('with-value', 'some-value'),

tests/Basic/CookieTest.php

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
use Behat\Mink\Tests\Driver\TestCase;
66

7-
class CookieTest extends TestCase
7+
final class CookieTest extends TestCase
88
{
99
/**
1010
* test cookie decoding.
@@ -87,7 +87,7 @@ public function testCookieWithPaths($cookieRemovalMode)
8787
$this->assertStringContainsString('Previous cookie: NO', $session->getPage()->getText());
8888
}
8989

90-
public function cookieWithPathsDataProvider()
90+
public static function cookieWithPathsDataProvider()
9191
{
9292
return array(
9393
array('session_reset'),
@@ -123,14 +123,6 @@ public function testCookieInSubPath($cookieRemovalMode)
123123
$this->assertStringContainsString('Previous cookie: NO', $session->getPage()->getText());
124124
}
125125

126-
public function cookieInSubPathProvider()
127-
{
128-
return array(
129-
array('session_reset'),
130-
array('cookie_delete'),
131-
);
132-
}
133-
134126
public function testReset()
135127
{
136128
$this->getSession()->visit($this->pathTo('/cookie_page1.php'));

tests/Basic/ErrorHandlingTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
/**
88
* @group slow
99
*/
10-
class ErrorHandlingTest extends TestCase
10+
final class ErrorHandlingTest extends TestCase
1111
{
1212
const NOT_FOUND_XPATH = '//html/./invalid';
1313

tests/Basic/HeaderTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
use Behat\Mink\Tests\Driver\TestCase;
66

7-
class HeaderTest extends TestCase
7+
final class HeaderTest extends TestCase
88
{
99
/**
1010
* test referrer.

tests/Basic/IFrameTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
use Behat\Mink\Tests\Driver\TestCase;
66

7-
class IFrameTest extends TestCase
7+
final class IFrameTest extends TestCase
88
{
99
public function testIFrame()
1010
{

tests/Basic/NavigationTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
use Behat\Mink\Tests\Driver\TestCase;
66
use Yoast\PHPUnitPolyfills\Polyfills\AssertionRenames;
77

8-
class NavigationTest extends TestCase
8+
final class NavigationTest extends TestCase
99
{
1010
use AssertionRenames;
1111

tests/Basic/ScreenshotTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
use Behat\Mink\Tests\Driver\TestCase;
66

7-
class ScreenshotTest extends TestCase
7+
final class ScreenshotTest extends TestCase
88
{
99
public function testScreenshot()
1010
{

tests/Basic/StatusCodeTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
use Behat\Mink\Tests\Driver\TestCase;
66

7-
class StatusCodeTest extends TestCase
7+
final class StatusCodeTest extends TestCase
88
{
99
public function testStatuses()
1010
{

0 commit comments

Comments
 (0)