Skip to content

Commit 105a7ac

Browse files
OskarStarknicolas-grekas
authored andcommitted
Migrate to static data providers using rector/rector
1 parent c3709f4 commit 105a7ac

File tree

7 files changed

+12
-12
lines changed

7 files changed

+12
-12
lines changed

Tests/AbstractCrawlerTestCase.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -912,7 +912,7 @@ public function testSiblings()
912912
}
913913
}
914914

915-
public function provideMatchTests()
915+
public static function provideMatchTests()
916916
{
917917
yield ['#foo', true, '#foo'];
918918
yield ['#foo', true, '.foo'];
@@ -1160,7 +1160,7 @@ public function testBaseTag($baseValue, $linkValue, $expectedUri, $currentUri =
11601160
$this->assertEquals($expectedUri, $crawler->filterXPath('//a')->link()->getUri(), $description);
11611161
}
11621162

1163-
public function getBaseTagData()
1163+
public static function getBaseTagData()
11641164
{
11651165
return [
11661166
['http://base.com', 'link', 'http://base.com/link'],
@@ -1180,7 +1180,7 @@ public function testBaseTagWithForm($baseValue, $actionValue, $expectedUri, $cur
11801180
$this->assertEquals($expectedUri, $crawler->filterXPath('//button')->form()->getUri(), $description);
11811181
}
11821182

1183-
public function getBaseTagWithFormData()
1183+
public static function getBaseTagWithFormData()
11841184
{
11851185
return [
11861186
['https://base.com/', 'link/', 'https://base.com/link/', 'https://base.com/link/', '<base> tag does work with a path and relative form action'],

Tests/Field/FileFormFieldTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ public function testSetValue($method)
7878
);
7979
}
8080

81-
public function getSetValueMethods()
81+
public static function getSetValueMethods()
8282
{
8383
return [
8484
['setValue'],

Tests/FormTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ public function testConstructorThrowsExceptionIfNoRelatedForm(\DOMElement $node)
7878
new Form($node, 'http://example.com');
7979
}
8080

81-
public function constructorThrowsExceptionIfNoRelatedFormProvider()
81+
public static function constructorThrowsExceptionIfNoRelatedFormProvider()
8282
{
8383
$dom = new \DOMDocument();
8484
$dom->loadHTML('
@@ -217,7 +217,7 @@ function ($field) {
217217
);
218218
}
219219

220-
public function provideInitializeValues()
220+
public static function provideInitializeValues()
221221
{
222222
return [
223223
[
@@ -585,7 +585,7 @@ public function testGetUriWithActionOverride()
585585
$this->assertEquals('http://localhost/bar', $form->getUri(), '->getUri() returns absolute URIs');
586586
}
587587

588-
public function provideGetUriValues()
588+
public static function provideGetUriValues()
589589
{
590590
return [
591591
[

Tests/Html5ParserCrawlerTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public function testHtml5ParserWithInvalidHeadedContent(string $content)
5050
self::assertEmpty($crawler->filterXPath('//h1')->text(), '->addHtmlContent failed as expected');
5151
}
5252

53-
public function validHtml5Provider(): iterable
53+
public static function validHtml5Provider(): iterable
5454
{
5555
$html = self::getDoctype().'<html><body><h1><p>Foo</p></h1></body></html>';
5656
$BOM = \chr(0xEF).\chr(0xBB).\chr(0xBF);
@@ -63,7 +63,7 @@ public function validHtml5Provider(): iterable
6363
yield 'All together' => [$BOM.' <!--c-->'.$html];
6464
}
6565

66-
public function invalidHtml5Provider(): iterable
66+
public static function invalidHtml5Provider(): iterable
6767
{
6868
$html = self::getDoctype().'<html><body><h1><p>Foo</p></h1></body></html>';
6969

Tests/ImageTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public function testGetUri($url, $currentUri, $expected)
5656
$this->assertEquals($expected, $image->getUri());
5757
}
5858

59-
public function getGetUriTests()
59+
public static function getGetUriTests()
6060
{
6161
return [
6262
['/foo.png', 'http://localhost/bar/foo/', 'http://localhost/foo.png'],

Tests/LinkTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ public function testGetUriOnLink($url, $currentUri, $expected)
105105
$this->assertEquals($expected, $link->getUri());
106106
}
107107

108-
public function getGetUriTests()
108+
public static function getGetUriTests()
109109
{
110110
return [
111111
['/foo', 'http://localhost/bar/foo/', 'http://localhost/foo'],

Tests/UriResolverTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public function testResolver(string $uri, string $baseUri, string $expected)
2424
$this->assertEquals($expected, UriResolver::resolve($uri, $baseUri));
2525
}
2626

27-
public function provideResolverTests()
27+
public static function provideResolverTests()
2828
{
2929
return [
3030
['/foo', 'http://localhost/bar/foo/', 'http://localhost/foo'],

0 commit comments

Comments
 (0)