Skip to content

Commit

Permalink
Fix merge
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolas-grekas committed Feb 14, 2023
1 parent 8ec38e4 commit a3fedae
Showing 1 changed file with 21 additions and 21 deletions.
42 changes: 21 additions & 21 deletions Tests/InlineTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public function testParsePhpConstants($yaml, $value)
$this->assertSame($value, $actual);
}

public function getTestsForParsePhpConstants()
public static function getTestsForParsePhpConstants()
{
return [
['!php/const Symfony\Component\Yaml\Yaml::PARSE_CONSTANT', Yaml::PARSE_CONSTANT],
Expand Down Expand Up @@ -225,7 +225,7 @@ public function testParseReferences($yaml, $expected)
$this->assertSame($expected, Inline::parse($yaml, 0, $references));
}

public function getDataForParseReferences()
public static function getDataForParseReferences()
{
return [
'scalar' => ['*var', 'var-value'],
Expand Down Expand Up @@ -275,7 +275,7 @@ public function testParseUnquotedScalarStartingWithReservedIndicator($indicator)
Inline::parse(sprintf('{ foo: %sfoo }', $indicator));
}

public function getReservedIndicators()
public static function getReservedIndicators()
{
return [['@'], ['`']];
}
Expand All @@ -291,7 +291,7 @@ public function testParseUnquotedScalarStartingWithScalarIndicator($indicator)
Inline::parse(sprintf('{ foo: %sfoo }', $indicator));
}

public function getScalarIndicators()
public static function getScalarIndicators()
{
return [['|'], ['>'], ['%']];
}
Expand All @@ -304,7 +304,7 @@ public function testIsHash($array, $expected)
$this->assertSame($expected, Inline::isHash($array));
}

public function getDataForIsHash()
public static function getDataForIsHash()
{
return [
[[], false],
Expand All @@ -314,7 +314,7 @@ public function getDataForIsHash()
];
}

public function getTestsForParse()
public static function getTestsForParse()
{
return [
['', ''],
Expand Down Expand Up @@ -400,7 +400,7 @@ public function getTestsForParse()
];
}

public function getTestsForParseWithMapObjects()
public static function getTestsForParseWithMapObjects()
{
return [
['', ''],
Expand Down Expand Up @@ -481,7 +481,7 @@ public function getTestsForParseWithMapObjects()
];
}

public function getTestsForDump()
public static function getTestsForDump()
{
return [
['null', null],
Expand Down Expand Up @@ -583,7 +583,7 @@ public function testParseTimestampAsDateTimeObject(string $yaml, int $year, int
$this->assertSame($timezone, $date->format('O'));
}

public function getTimestampTests(): array
public static function getTimestampTests(): array
{
return [
'canonical' => ['2001-12-15T02:59:43.1Z', 2001, 12, 15, 2, 59, 43, 100000, '+0000'],
Expand Down Expand Up @@ -632,7 +632,7 @@ public function testParseBackedEnumValue()
$this->assertSame(FooBackedEnum::BAR->value, Inline::parse("!php/enum Symfony\Component\Yaml\Tests\Fixtures\FooBackedEnum::BAR->value", Yaml::PARSE_CONSTANT));
}

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

Expand All @@ -653,7 +653,7 @@ public function testParseBinaryData($data)
$this->assertSame('Hello world', Inline::parse($data));
}

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

public function getInvalidBinaryData()
public static function getInvalidBinaryData()
{
return [
'length not a multiple of four' => ['!!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 @@ -715,7 +715,7 @@ public function testParseMissingMappingValueAsNull($yaml, $expected)
$this->assertSame($expected, Inline::parse($yaml));
}

public function getTestsForNullValues()
public static function getTestsForNullValues()
{
return [
'null before closing curly brace' => ['{foo:}', ['foo' => null]],
Expand All @@ -738,7 +738,7 @@ public function testImplicitStringCastingOfMappingKeysIsDeprecated($yaml, $expec
$this->assertSame($expected, Inline::parse($yaml));
}

public function getNotPhpCompatibleMappingKeyData()
public static function getNotPhpCompatibleMappingKeyData()
{
return [
'boolean-true' => ['{true: "foo"}', ['true' => 'foo']],
Expand Down Expand Up @@ -817,7 +817,7 @@ public function testParseOctalNumbers($expected, $yaml)
self::assertSame($expected, Inline::parse($yaml));
}

public function getTestsForOctalNumbers()
public static function getTestsForOctalNumbers()
{
return [
'positive octal number' => [28, '0o34'],
Expand All @@ -834,7 +834,7 @@ public function testParseOctalNumbersYaml11Notation(string $expected, string $ya
self::assertSame($expected, Inline::parse($yaml));
}

public function getTestsForOctalNumbersYaml11Notation()
public static function getTestsForOctalNumbersYaml11Notation()
{
return [
'positive octal number' => ['034', '034'],
Expand All @@ -856,7 +856,7 @@ public function testPhpObjectWithEmptyValue(string $value)
Inline::parse($value, Yaml::PARSE_OBJECT);
}

public function phpObjectTagWithEmptyValueProvider()
public static function phpObjectTagWithEmptyValueProvider()
{
return [
['!php/object'],
Expand Down Expand Up @@ -890,7 +890,7 @@ public function testPhpEnumTagWithEmptyValue(string $value)
Inline::parse(str_replace('!php/const', '!php/enum', $value), Yaml::PARSE_CONSTANT);
}

public function phpConstTagWithEmptyValueProvider()
public static function phpConstTagWithEmptyValueProvider()
{
return [
['!php/const'],
Expand Down Expand Up @@ -926,7 +926,7 @@ public function testUnquotedExclamationMarkThrows(string $value)
Inline::parse($value);
}

public function unquotedExclamationMarkThrowsProvider()
public static function unquotedExclamationMarkThrowsProvider()
{
return [
['!'],
Expand Down Expand Up @@ -958,7 +958,7 @@ public function testQuotedExclamationMark($expected, string $value)
}

// This provider should stay consistent with unquotedExclamationMarkThrowsProvider
public function quotedExclamationMarkProvider()
public static function quotedExclamationMarkProvider()
{
return [
['!', '"!"'],
Expand Down Expand Up @@ -988,7 +988,7 @@ public function testParseIdeographicSpace(string $yaml, string $expected)
$this->assertSame($expected, Inline::parse($yaml));
}

public function ideographicSpaceProvider(): array
public static function ideographicSpaceProvider(): array
{
return [
["\u{3000}", ' '],
Expand Down

0 comments on commit a3fedae

Please sign in to comment.