Skip to content

Commit 65a906f

Browse files
Merge branch '5.4' into 6.2
* 5.4: Migrate to `static` data providers using `rector/rector`
2 parents f2d15d9 + 105a7ac commit 65a906f

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
@@ -902,7 +902,7 @@ public function testSiblings()
902902
}
903903
}
904904

905-
public function provideMatchTests()
905+
public static function provideMatchTests()
906906
{
907907
yield ['#foo', true, '#foo'];
908908
yield ['#foo', true, '.foo'];
@@ -1125,7 +1125,7 @@ public function testBaseTag($baseValue, $linkValue, $expectedUri, $currentUri =
11251125
$this->assertEquals($expectedUri, $crawler->filterXPath('//a')->link()->getUri(), $description);
11261126
}
11271127

1128-
public function getBaseTagData()
1128+
public static function getBaseTagData()
11291129
{
11301130
return [
11311131
['http://base.com', 'link', 'http://base.com/link'],
@@ -1145,7 +1145,7 @@ public function testBaseTagWithForm($baseValue, $actionValue, $expectedUri, $cur
11451145
$this->assertEquals($expectedUri, $crawler->filterXPath('//button')->form()->getUri(), $description);
11461146
}
11471147

1148-
public function getBaseTagWithFormData()
1148+
public static function getBaseTagWithFormData()
11491149
{
11501150
return [
11511151
['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
@@ -46,7 +46,7 @@ public function testHtml5ParserWithInvalidHeadedContent(string $content)
4646
self::assertEmpty($crawler->filterXPath('//h1')->text(), '->addHtmlContent failed as expected');
4747
}
4848

49-
public function validHtml5Provider(): iterable
49+
public static function validHtml5Provider(): iterable
5050
{
5151
$html = self::getDoctype().'<html><body><h1><p>Foo</p></h1></body></html>';
5252
$BOM = \chr(0xEF).\chr(0xBB).\chr(0xBF);
@@ -59,7 +59,7 @@ public function validHtml5Provider(): iterable
5959
yield 'All together' => [$BOM.' <!--c-->'.$html];
6060
}
6161

62-
public function invalidHtml5Provider(): iterable
62+
public static function invalidHtml5Provider(): iterable
6363
{
6464
$html = self::getDoctype().'<html><body><h1><p>Foo</p></h1></body></html>';
6565

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)