public function InlineTest::getTestsForDump in Lockr 7.3
File
- vendor/
symfony/ yaml/ Tests/ InlineTest.php, line 536
Class
Namespace
Symfony\Component\Yaml\TestsCode
public function getTestsForDump() {
return [
[
'null',
null,
],
[
'false',
false,
],
[
'true',
true,
],
[
'12',
12,
],
[
"'1_2'",
'1_2',
],
[
'_12',
'_12',
],
[
"'12_'",
'12_',
],
[
"'quoted string'",
'quoted string',
],
[
'!!float 1230',
1230.0,
],
[
'1234',
0x4d2,
],
[
'1243',
02333,
],
[
"'0x_4_D_2_'",
'0x_4_D_2_',
],
[
"'0_2_3_3_3'",
'0_2_3_3_3',
],
[
'.Inf',
-log(0),
],
[
'-.Inf',
log(0),
],
[
"'686e444'",
'686e444',
],
[
'"foo\\r\\nbar"',
"foo\r\nbar",
],
[
"'foo#bar'",
'foo#bar',
],
[
"'foo # bar'",
'foo # bar',
],
[
"'#cfcfcf'",
'#cfcfcf',
],
[
"'a \"string\" with ''quoted strings inside'''",
'a "string" with \'quoted strings inside\'',
],
[
"'-dash'",
'-dash',
],
[
"'-'",
'-',
],
// Pre-YAML-1.2 booleans
[
"'y'",
'y',
],
[
"'n'",
'n',
],
[
"'yes'",
'yes',
],
[
"'no'",
'no',
],
[
"'on'",
'on',
],
[
"'off'",
'off',
],
// sequences
[
'[foo, bar, false, null, 12]',
[
'foo',
'bar',
false,
null,
12,
],
],
[
'[\'foo,bar\', \'foo bar\']',
[
'foo,bar',
'foo bar',
],
],
// mappings
[
'{ foo: bar, bar: foo, \'false\': false, \'null\': null, integer: 12 }',
[
'foo' => 'bar',
'bar' => 'foo',
'false' => false,
'null' => null,
'integer' => 12,
],
],
[
'{ foo: bar, bar: \'foo: bar\' }',
[
'foo' => 'bar',
'bar' => 'foo: bar',
],
],
// nested sequences and mappings
[
'[foo, [bar, foo]]',
[
'foo',
[
'bar',
'foo',
],
],
],
[
'[foo, [bar, [foo, [bar, foo]], foo]]',
[
'foo',
[
'bar',
[
'foo',
[
'bar',
'foo',
],
],
'foo',
],
],
],
[
'{ foo: { bar: foo } }',
[
'foo' => [
'bar' => 'foo',
],
],
],
[
'[foo, { bar: foo }]',
[
'foo',
[
'bar' => 'foo',
],
],
],
[
'[foo, { bar: foo, foo: [foo, { bar: foo }] }, [foo, { bar: foo }]]',
[
'foo',
[
'bar' => 'foo',
'foo' => [
'foo',
[
'bar' => 'foo',
],
],
],
[
'foo',
[
'bar' => 'foo',
],
],
],
],
[
'[foo, \'@foo.baz\', { \'%foo%\': \'foo is %foo%\', bar: \'%foo%\' }, true, \'@service_container\']',
[
'foo',
'@foo.baz',
[
'%foo%' => 'foo is %foo%',
'bar' => '%foo%',
],
true,
'@service_container',
],
],
[
'{ foo: { bar: { 1: 2, baz: 3 } } }',
[
'foo' => [
'bar' => [
1 => 2,
'baz' => 3,
],
],
],
],
];
}