Skip to content

Commit

Permalink
Merge branch '5.4' into 6.2
Browse files Browse the repository at this point in the history
* 5.4:
  Migrate to `static` data providers using `rector/rector`
  • Loading branch information
nicolas-grekas committed Feb 14, 2023
2 parents 0844575 + a866ca7 commit 87bd432
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Tests/AbstractBrowserTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -623,7 +623,7 @@ public function testFollowMetaRefresh(string $content, string $expectedEndingUrl
$this->assertSame($expectedEndingUrl, $client->getRequest()->getUri());
}

public function getTestsForMetaRefresh()
public static function getTestsForMetaRefresh()
{
return [
['<html><head><meta http-equiv="Refresh" content="4" /><meta http-equiv="refresh" content="0; URL=http://www.example.com/redirected"/></head></html>', 'http://www.example.com/redirected'],
Expand Down
2 changes: 1 addition & 1 deletion Tests/CookieJarTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ public function testAllValues($uri, $values)
$this->assertEquals($values, array_keys($cookieJar->allValues($uri)), '->allValues() returns the cookie for a given URI');
}

public function provideAllValuesValues()
public static function provideAllValuesValues()
{
return [
['http://www.example.com', ['foo_nothing', 'foo_domain']],
Expand Down
4 changes: 2 additions & 2 deletions Tests/CookieTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public function testToFromString($cookie, $url = null)
$this->assertEquals($cookie, (string) Cookie::fromString($cookie, $url));
}

public function getTestsForToFromString()
public static function getTestsForToFromString()
{
return [
['foo=bar; path=/'],
Expand Down Expand Up @@ -71,7 +71,7 @@ public function testFromStringAcceptsSeveralExpiresDateFormats($cookie)
$this->assertEquals(1596185377, Cookie::fromString($cookie)->getExpiresTime());
}

public function getExpireCookieStrings()
public static function getExpireCookieStrings()
{
return [
['foo=bar; expires=Fri, 31-Jul-2020 08:49:37 GMT'],
Expand Down
4 changes: 2 additions & 2 deletions Tests/HttpBrowserTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public function testRequestHeaders(array $requestArguments, array $expectedArgum
$browser->request(...$requestArguments);
}

public function validContentTypes()
public static function validContentTypes()
{
$defaultHeaders = ['user-agent' => 'Symfony BrowserKit', 'host' => 'example.com'];
yield 'GET/HEAD' => [
Expand Down Expand Up @@ -199,7 +199,7 @@ public function testMultipleForwardSlashesRequestPath(string $requestPath)
$browser->request('GET', $requestPath);
}

public function forwardSlashesRequestPathProvider()
public static function forwardSlashesRequestPathProvider()
{
return [
'one slash' => ['/'],
Expand Down
2 changes: 1 addition & 1 deletion Tests/ResponseTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ public function testToArrayThrowsErrorOnInvalidJson(string $data)
$response->toArray();
}

public function provideInvalidJson(): iterable
public static function provideInvalidJson(): iterable
{
yield 'Empty string' => [''];
yield 'Not json' => ['freferfrefer'];
Expand Down

0 comments on commit 87bd432

Please sign in to comment.