Skip to content

Commit 8ec38e4

Browse files
Merge branch '5.4' into 6.2
* 5.4: Migrate to `static` data providers using `rector/rector`
2 parents 97235cb + c8336db commit 8ec38e4

File tree

3 files changed

+19
-19
lines changed

3 files changed

+19
-19
lines changed

Tests/Command/LintCommandTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ public function testComplete(array $input, array $expectedSuggestions)
171171
$this->assertSame($expectedSuggestions, $tester->complete($input));
172172
}
173173

174-
public function provideCompletionSuggestions()
174+
public static function provideCompletionSuggestions()
175175
{
176176
yield 'option' => [['--format', ''], ['txt', 'json', 'github']];
177177
}

Tests/DumperTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ public function testEscapedEscapeSequencesInQuotedScalar($input, $expected)
225225
$this->assertSameData($input, $this->parser->parse($expected));
226226
}
227227

228-
public function getEscapeSequences()
228+
public static function getEscapeSequences()
229229
{
230230
return [
231231
'empty string' => ['', "''"],
@@ -275,7 +275,7 @@ public function testDumpObjectAsMap($object, $expected)
275275
$this->assertSameData($expected, $this->parser->parse($yaml, Yaml::PARSE_OBJECT_FOR_MAP));
276276
}
277277

278-
public function objectAsMapProvider()
278+
public static function objectAsMapProvider()
279279
{
280280
$tests = [];
281281

Tests/ParserTest.php

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ public function testTabsAsIndentationInYaml(string $given, string $expectedMessa
146146
$this->parser->parse($given);
147147
}
148148

149-
public function invalidIndentation(): array
149+
public static function invalidIndentation(): array
150150
{
151151
return [
152152
[
@@ -191,7 +191,7 @@ public function testValidTokenSeparation(string $given, array $expected)
191191
$this->assertSameData($expected, $actual);
192192
}
193193

194-
public function validTokenSeparators(): array
194+
public static function validTokenSeparators(): array
195195
{
196196
return [
197197
[
@@ -224,7 +224,7 @@ public function testEndOfTheDocumentMarker()
224224
$this->assertEquals('foo', $this->parser->parse($yaml));
225225
}
226226

227-
public function getBlockChompingTests()
227+
public static function getBlockChompingTests()
228228
{
229229
$tests = [];
230230

@@ -588,7 +588,7 @@ public function testObjectForMap($yaml, $expected)
588588
$this->assertSameData($expected, $this->parser->parse($yaml, $flags));
589589
}
590590

591-
public function getObjectForMapTests()
591+
public static function getObjectForMapTests()
592592
{
593593
$tests = [];
594594

@@ -835,7 +835,7 @@ public function testNonStringFollowedByCommentEmbeddedInMapping()
835835
$this->assertSame($expected, $this->parser->parse($yaml));
836836
}
837837

838-
public function getParseExceptionNotAffectedMultiLineStringLastResortParsing()
838+
public static function getParseExceptionNotAffectedMultiLineStringLastResortParsing()
839839
{
840840
$tests = [];
841841

@@ -977,7 +977,7 @@ public function testParseExceptionOnDuplicate($input, $duplicateKey, $lineNumber
977977
Yaml::parse($input);
978978
}
979979

980-
public function getParseExceptionOnDuplicateData()
980+
public static function getParseExceptionOnDuplicateData()
981981
{
982982
$tests = [];
983983

@@ -1282,7 +1282,7 @@ public function testCommentLikeStringsAreNotStrippedInBlockScalars($yaml, $expec
12821282
$this->assertSame($expectedParserResult, $this->parser->parse($yaml));
12831283
}
12841284

1285-
public function getCommentLikeStringInScalarBlockData()
1285+
public static function getCommentLikeStringInScalarBlockData()
12861286
{
12871287
$tests = [];
12881288

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

1470-
public function getBinaryData()
1470+
public static function getBinaryData()
14711471
{
14721472
return [
14731473
'enclosed with double quotes' => ['data: !!binary "SGVsbG8gd29ybGQ="'],
@@ -1499,7 +1499,7 @@ public function testParseInvalidBinaryData($data, $expectedMessage)
14991499
$this->parser->parse($data);
15001500
}
15011501

1502-
public function getInvalidBinaryData()
1502+
public static function getInvalidBinaryData()
15031503
{
15041504
return [
15051505
'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\)/'],
@@ -1565,7 +1565,7 @@ public function testParserThrowsExceptionWithCorrectLineNumber($lineNumber, $yam
15651565
$this->parser->parse($yaml);
15661566
}
15671567

1568-
public function parserThrowsExceptionWithCorrectLineNumberProvider()
1568+
public static function parserThrowsExceptionWithCorrectLineNumberProvider()
15691569
{
15701570
return [
15711571
[
@@ -1722,7 +1722,7 @@ public function testParseQuotedStringContainingEscapedQuotationCharacters(string
17221722
$this->assertSame($expected, $this->parser->parse($yaml));
17231723
}
17241724

1725-
public function escapedQuotationCharactersInQuotedStrings()
1725+
public static function escapedQuotationCharactersInQuotedStrings()
17261726
{
17271727
return [
17281728
'single quoted string' => [
@@ -1780,7 +1780,7 @@ public function testParseMultiLineMappingValue($yaml, $expected, $parseError)
17801780
$this->assertSame($expected, $this->parser->parse($yaml));
17811781
}
17821782

1783-
public function multiLineDataProvider()
1783+
public static function multiLineDataProvider()
17841784
{
17851785
$tests = [];
17861786

@@ -1847,7 +1847,7 @@ public function testInlineNotationSpanningMultipleLines($expected, string $yaml)
18471847
$this->assertSame($expected, $this->parser->parse($yaml));
18481848
}
18491849

1850-
public function inlineNotationSpanningMultipleLinesProvider(): array
1850+
public static function inlineNotationSpanningMultipleLinesProvider(): array
18511851
{
18521852
return [
18531853
'mapping' => [
@@ -2236,7 +2236,7 @@ public function testCustomTagSupport($expected, $yaml)
22362236
$this->assertSameData($expected, $this->parser->parse($yaml, Yaml::PARSE_CUSTOM_TAGS));
22372237
}
22382238

2239-
public function taggedValuesProvider()
2239+
public static function taggedValuesProvider()
22402240
{
22412241
return [
22422242
'scalars' => [
@@ -2671,7 +2671,7 @@ public function testDetectCircularReferences($yaml)
26712671
$this->parser->parse($yaml, Yaml::PARSE_CUSTOM_TAGS);
26722672
}
26732673

2674-
public function circularReferenceProvider()
2674+
public static function circularReferenceProvider()
26752675
{
26762676
$tests = [];
26772677

@@ -2711,7 +2711,7 @@ public function testParseIndentedMappings($yaml, $expected)
27112711
$this->assertSame($expected, $this->parser->parse($yaml));
27122712
}
27132713

2714-
public function indentedMappingData()
2714+
public static function indentedMappingData()
27152715
{
27162716
$tests = [];
27172717

0 commit comments

Comments
 (0)