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 97235cb + c8336db commit 8ec38e4
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 19 deletions.
2 changes: 1 addition & 1 deletion Tests/Command/LintCommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ public function testComplete(array $input, array $expectedSuggestions)
$this->assertSame($expectedSuggestions, $tester->complete($input));
}

public function provideCompletionSuggestions()
public static function provideCompletionSuggestions()
{
yield 'option' => [['--format', ''], ['txt', 'json', 'github']];
}
Expand Down
4 changes: 2 additions & 2 deletions Tests/DumperTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ public function testEscapedEscapeSequencesInQuotedScalar($input, $expected)
$this->assertSameData($input, $this->parser->parse($expected));
}

public function getEscapeSequences()
public static function getEscapeSequences()
{
return [
'empty string' => ['', "''"],
Expand Down Expand Up @@ -275,7 +275,7 @@ public function testDumpObjectAsMap($object, $expected)
$this->assertSameData($expected, $this->parser->parse($yaml, Yaml::PARSE_OBJECT_FOR_MAP));
}

public function objectAsMapProvider()
public static function objectAsMapProvider()
{
$tests = [];

Expand Down
32 changes: 16 additions & 16 deletions Tests/ParserTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ public function testTabsAsIndentationInYaml(string $given, string $expectedMessa
$this->parser->parse($given);
}

public function invalidIndentation(): array
public static function invalidIndentation(): array
{
return [
[
Expand Down Expand Up @@ -191,7 +191,7 @@ public function testValidTokenSeparation(string $given, array $expected)
$this->assertSameData($expected, $actual);
}

public function validTokenSeparators(): array
public static function validTokenSeparators(): array
{
return [
[
Expand Down Expand Up @@ -224,7 +224,7 @@ public function testEndOfTheDocumentMarker()
$this->assertEquals('foo', $this->parser->parse($yaml));
}

public function getBlockChompingTests()
public static function getBlockChompingTests()
{
$tests = [];

Expand Down Expand Up @@ -588,7 +588,7 @@ public function testObjectForMap($yaml, $expected)
$this->assertSameData($expected, $this->parser->parse($yaml, $flags));
}

public function getObjectForMapTests()
public static function getObjectForMapTests()
{
$tests = [];

Expand Down Expand Up @@ -835,7 +835,7 @@ public function testNonStringFollowedByCommentEmbeddedInMapping()
$this->assertSame($expected, $this->parser->parse($yaml));
}

public function getParseExceptionNotAffectedMultiLineStringLastResortParsing()
public static function getParseExceptionNotAffectedMultiLineStringLastResortParsing()
{
$tests = [];

Expand Down Expand Up @@ -977,7 +977,7 @@ public function testParseExceptionOnDuplicate($input, $duplicateKey, $lineNumber
Yaml::parse($input);
}

public function getParseExceptionOnDuplicateData()
public static function getParseExceptionOnDuplicateData()
{
$tests = [];

Expand Down Expand Up @@ -1282,7 +1282,7 @@ public function testCommentLikeStringsAreNotStrippedInBlockScalars($yaml, $expec
$this->assertSame($expectedParserResult, $this->parser->parse($yaml));
}

public function getCommentLikeStringInScalarBlockData()
public static function getCommentLikeStringInScalarBlockData()
{
$tests = [];

Expand Down Expand Up @@ -1467,7 +1467,7 @@ public function testParseBinaryData($data)
$this->assertSame(['data' => 'Hello world'], $this->parser->parse($data));
}

public function getBinaryData()
public static function getBinaryData()
{
return [
'enclosed with double quotes' => ['data: !!binary "SGVsbG8gd29ybGQ="'],
Expand Down Expand Up @@ -1499,7 +1499,7 @@ public function testParseInvalidBinaryData($data, $expectedMessage)
$this->parser->parse($data);
}

public function getInvalidBinaryData()
public static function getInvalidBinaryData()
{
return [
'length not a multiple of four' => ['data: !!binary "SGVsbG8d29ybGQ="', '/The normalized base64 encoded data \(data without whitespace characters\) length must be a multiple of four \(\d+ bytes given\)/'],
Expand Down Expand Up @@ -1565,7 +1565,7 @@ public function testParserThrowsExceptionWithCorrectLineNumber($lineNumber, $yam
$this->parser->parse($yaml);
}

public function parserThrowsExceptionWithCorrectLineNumberProvider()
public static function parserThrowsExceptionWithCorrectLineNumberProvider()
{
return [
[
Expand Down Expand Up @@ -1722,7 +1722,7 @@ public function testParseQuotedStringContainingEscapedQuotationCharacters(string
$this->assertSame($expected, $this->parser->parse($yaml));
}

public function escapedQuotationCharactersInQuotedStrings()
public static function escapedQuotationCharactersInQuotedStrings()
{
return [
'single quoted string' => [
Expand Down Expand Up @@ -1780,7 +1780,7 @@ public function testParseMultiLineMappingValue($yaml, $expected, $parseError)
$this->assertSame($expected, $this->parser->parse($yaml));
}

public function multiLineDataProvider()
public static function multiLineDataProvider()
{
$tests = [];

Expand Down Expand Up @@ -1847,7 +1847,7 @@ public function testInlineNotationSpanningMultipleLines($expected, string $yaml)
$this->assertSame($expected, $this->parser->parse($yaml));
}

public function inlineNotationSpanningMultipleLinesProvider(): array
public static function inlineNotationSpanningMultipleLinesProvider(): array
{
return [
'mapping' => [
Expand Down Expand Up @@ -2236,7 +2236,7 @@ public function testCustomTagSupport($expected, $yaml)
$this->assertSameData($expected, $this->parser->parse($yaml, Yaml::PARSE_CUSTOM_TAGS));
}

public function taggedValuesProvider()
public static function taggedValuesProvider()
{
return [
'scalars' => [
Expand Down Expand Up @@ -2671,7 +2671,7 @@ public function testDetectCircularReferences($yaml)
$this->parser->parse($yaml, Yaml::PARSE_CUSTOM_TAGS);
}

public function circularReferenceProvider()
public static function circularReferenceProvider()
{
$tests = [];

Expand Down Expand Up @@ -2711,7 +2711,7 @@ public function testParseIndentedMappings($yaml, $expected)
$this->assertSame($expected, $this->parser->parse($yaml));
}

public function indentedMappingData()
public static function indentedMappingData()
{
$tests = [];

Expand Down

0 comments on commit 8ec38e4

Please sign in to comment.