Lines Matching refs:yaml

40     public function testSpecifications($expected, $yaml, $comment)  argument
42 $this->assertEquals($expected, var_export($this->parser->parse($yaml), true), $comment);
65 foreach ($yamls as $yaml) {
67 $content = $this->parser->parse($yaml);
72 … YAML file cannot contain tabs as indentation at line 2 (near "'.strpbrk($yaml, "\t").'").', $e->g…
79 $yaml = <<<'EOF'
85 $this->assertEquals('foo', $this->parser->parse($yaml));
92 $yaml = <<<'EOF'
105 $tests['Literal block chomping strip with single trailing newline'] = [$expected, $yaml];
107 $yaml = <<<'EOF'
122 $tests['Literal block chomping strip with multiple trailing newlines'] = [$expected, $yaml];
124 $yaml = <<<'EOF'
130 …iteral block chomping strip with multiple trailing newlines after a 1-liner'] = [$expected, $yaml];
132 $yaml = <<<'EOF'
144 $tests['Literal block chomping strip without trailing newline'] = [$expected, $yaml];
146 $yaml = <<<'EOF'
159 $tests['Literal block chomping clip with single trailing newline'] = [$expected, $yaml];
161 $yaml = <<<'EOF'
176 $tests['Literal block chomping clip with multiple trailing newlines'] = [$expected, $yaml];
178 $yaml = <<<'EOF'
192 …l block chomping clip with embedded blank line inside unindented collection'] = [$expected, $yaml];
194 $yaml = <<<'EOF'
206 $tests['Literal block chomping clip without trailing newline'] = [$expected, $yaml];
208 $yaml = <<<'EOF'
221 $tests['Literal block chomping keep with single trailing newline'] = [$expected, $yaml];
223 $yaml = <<<'EOF'
238 $tests['Literal block chomping keep with multiple trailing newlines'] = [$expected, $yaml];
240 $yaml = <<<'EOF'
252 $tests['Literal block chomping keep without trailing newline'] = [$expected, $yaml];
254 $yaml = <<<'EOF'
267 $tests['Folded block chomping strip with single trailing newline'] = [$expected, $yaml];
269 $yaml = <<<'EOF'
284 $tests['Folded block chomping strip with multiple trailing newlines'] = [$expected, $yaml];
286 $yaml = <<<'EOF'
298 $tests['Folded block chomping strip without trailing newline'] = [$expected, $yaml];
300 $yaml = <<<'EOF'
313 $tests['Folded block chomping clip with single trailing newline'] = [$expected, $yaml];
315 $yaml = <<<'EOF'
330 $tests['Folded block chomping clip with multiple trailing newlines'] = [$expected, $yaml];
332 $yaml = <<<'EOF'
344 $tests['Folded block chomping clip without trailing newline'] = [$expected, $yaml];
346 $yaml = <<<'EOF'
359 $tests['Folded block chomping keep with single trailing newline'] = [$expected, $yaml];
361 $yaml = <<<'EOF'
376 $tests['Folded block chomping keep with multiple trailing newlines'] = [$expected, $yaml];
378 $yaml = <<<'EOF'
390 $tests['Folded block chomping keep without trailing newline'] = [$expected, $yaml];
398 public function testBlockChomping($expected, $yaml) argument
400 $this->assertSame($expected, $this->parser->parse($yaml));
410 $yaml = <<<'EOF'
421 $this->assertSame($expected, $this->parser->parse($yaml));
445 public function testObjectForMap($yaml, $expected) argument
449 $this->assertEquals($expected, $this->parser->parse($yaml, $flags));
456 $yaml = <<<'EOF'
463 $tests['mapping'] = [$yaml, $expected];
465 $yaml = '{ "foo": "bar", "fiz": "cat" }';
469 $tests['inline-mapping'] = [$yaml, $expected];
471 $yaml = "foo: bar\nbaz: foobar";
475 $tests['object-for-map-is-applied-after-parsing'] = [$yaml, $expected];
477 $yaml = <<<'EOT'
488 $tests['nest-map-and-sequence'] = [$yaml, $expected];
490 $yaml = <<<'YAML'
499 $tests['numeric-keys'] = [$yaml, $expected];
501 $yaml = <<<'YAML'
510 $tests['zero-indexed-numeric-keys'] = [$yaml, $expected];
520 $yaml = <<<'EOF'
525 $this->parser->parse($yaml, Yaml::PARSE_EXCEPTION_ON_INVALID_TYPE);
530 $yaml = "items: \n foo: bar";
536 $this->assertSame($expected, $this->parser->parse($yaml));
550 foreach ($yamls as $yaml) {
552 $this->parser->parse($yaml);
566 $yaml = <<<'EOF'
575 $this->parser->parse($yaml);
583 $yaml = <<<'EOF'
591 $this->parser->parse($yaml);
630 $yaml = <<<'EOT'
653 $this->assertSame($expected, $this->parser->parse($yaml));
658 $yaml = <<<'EOT'
672 $this->assertSame($expected, $this->parser->parse($yaml));
677 $yaml = <<<'EOT'
693 $this->assertSame($expected, $this->parser->parse($yaml));
700 $yaml = <<<'EOT'
704 $tests['parse error on first line'] = [$yaml];
706 $yaml = <<<'EOT'
712 $tests['parse error due to inconsistent indentation'] = [$yaml];
714 $yaml = <<<'EOT'
717 $tests['symfony/symfony/issues/22967#issuecomment-322067742'] = [$yaml];
726 public function testParseExceptionNotAffectedByMultiLineStringLastResortParsing($yaml) argument
728 $this->parser->parse($yaml);
733 $yaml = <<<'EOT'
743 $this->assertSame($expected, $this->parser->parse($yaml));
745 $yaml = <<<'EOT'
754 $this->assertSame($expected, $this->parser->parse($yaml));
849 $yaml = <<<EOD
852 $tests[] = [$yaml, 'child', 1];
854 $yaml = <<<EOD
859 $tests[] = [$yaml, 'child', 3];
861 $yaml = <<<EOD
865 $tests[] = [$yaml, 'parent', 2];
867 $yaml = <<<EOD
870 $tests[] = [$yaml, 'child_mapping', 1];
872 $yaml = <<<EOD
879 $tests[] = [$yaml, 'child_mapping', 4];
881 $yaml = <<<EOD
884 $tests[] = [$yaml, 'child_sequence', 1];
886 $yaml = <<<EOD
897 $tests[] = [$yaml, 'child_sequence', 6];
1054 $yaml = <<<'EOF'
1060 $this->assertEquals(['foo' => 1, 'bar' => 2], $this->parser->parse($yaml));
1069 $yaml = <<<'EOF'
1075 $this->parser->parse($yaml);
1084 $yaml = <<<'EOF'
1089 $this->parser->parse($yaml);
1094 $yaml = <<<'EOF'
1114 $this->assertEquals($expected, $this->parser->parse($yaml));
1123 $yaml = <<<'EOF'
1127 $this->parser->parse($yaml);
1132 $yaml = <<<'EOT'
1137 $this->assertSame(['foo' => ['bar' => 'foobar']], $this->parser->parse($yaml));
1143 public function testCommentLikeStringsAreNotStrippedInBlockScalars($yaml, $expectedParserResult) argument
1145 $this->assertSame($expectedParserResult, $this->parser->parse($yaml));
1152 $yaml = <<<'EOT'
1186 $tests[] = [$yaml, $expected];
1188 $yaml = <<<'EOT'
1231 $tests[] = [$yaml, $expected];
1233 $yaml = <<<'EOT'
1253 $tests[] = [$yaml, $expected];
1255 $yaml = <<<'EOT'
1269 $tests[] = [$yaml, $expected];
1276 $yaml = <<<'EOT'
1294 $this->parser->parse($yaml)
1300 $yaml = <<<'EOT'
1321 $this->parser->parse($yaml)
1413 $yaml = <<<'EOT'
1421 … $this->assertEquals(['date' => $expectedDate], $this->parser->parse($yaml, Yaml::PARSE_DATETIME));
1429 public function testParserThrowsExceptionWithCorrectLineNumber($lineNumber, $yaml) argument
1438 $this->parser->parse($yaml);
1496 $yaml = <<<EOT
1504 … $this->assertSame(['foo' => 'bar baz foobar foo', 'bar' => 'baz'], $this->parser->parse($yaml));
1509 $yaml = <<<YAML
1515 $this->assertSame(['foobar' => 'foobar'], $this->parser->parse($yaml));
1520 $yaml = <<<YAML
1533 $this->assertSame($expected, $this->parser->parse($yaml));
1538 $yaml = <<<YAML
1547 $this->assertSame($expected, $this->parser->parse($yaml));
1552 $yaml = <<<EOT
1560 … $this->assertSame(['foo' => 'bar baz foobar foo', 'bar' => 'baz'], $this->parser->parse($yaml));
1571 public function testParseMultiLineMappingValue($yaml, $expected, $parseError) argument
1573 $this->assertEquals($expected, $this->parser->parse($yaml));
1580 $yaml = <<<'EOF'
1596 $tests[] = [$yaml, $expected, false];
1598 $yaml = <<<'EOF'
1604 $tests[] = [$yaml, $expected, false];
1606 $yaml = <<<'EOF'
1612 $tests[] = [$yaml, $expected, false];
1614 $yaml = <<<'EOF'
1621 $tests[] = [$yaml, $expected, false];
1623 $yaml = <<<'EOF'
1630 $tests[] = [$yaml, $expected, false];
1643 public function testCustomTagSupport($expected, $yaml) argument
1645 $this->assertEquals($expected, $this->parser->parse($yaml, Yaml::PARSE_CUSTOM_TAGS));
1741 $yaml = <<<YAML
1747 $this->parser->parse($yaml);
1756 $yaml = <<<YAML
1763 $this->parser->parse($yaml);
1772 $yaml = <<<YAML
1778 $this->parser->parse($yaml);
1806 foreach (preg_split('/^---( %YAML\:1\.0)?/m', $yamls) as $yaml) {
1807 if (!$yaml) {
1811 $test = $parser->parse($yaml);
1842 $yaml = <<<YAML
1848 $this->parser->parse($yaml);
1850 $yaml = <<<YAML
1854 $this->parser->parse($yaml);
1859 $yaml = <<<YAML
1877 $this->assertSame($expected, $this->parser->parse($yaml, Yaml::PARSE_CONSTANT));
1882 $yaml = <<<YAML
1914 $this->assertEquals($expected, $this->parser->parse($yaml, Yaml::PARSE_OBJECT_FOR_MAP));
1960 $yaml = <<<YAML
1983 $this->assertSame($expected, $this->parser->parse($yaml));
1988 $yaml = <<<YAML
2011 $this->assertEquals($expected, $this->parser->parse($yaml, Yaml::PARSE_OBJECT_FOR_MAP));
2020 $yaml = <<<EOE
2023 $this->parser->parse($yaml);
2031 public function testDetectCircularReferences($yaml) argument
2033 $this->parser->parse($yaml, Yaml::PARSE_CUSTOM_TAGS);
2040 $yaml = <<<YAML
2047 $tests['sequence'] = [$yaml];
2049 $yaml = <<<YAML
2055 $tests['mapping'] = [$yaml];
2057 $yaml = <<<YAML
2063 $tests['mapping with merge key'] = [$yaml];
2071 public function testParseIndentedMappings($yaml, $expected) argument
2073 $this->assertSame($expected, $this->parser->parse($yaml));
2080 $yaml = <<<YAML
2094 $tests['comment line is first line in indented block'] = [$yaml, $expected];
2096 $yaml = <<<YAML
2111 $tests['mapping value on new line starting with a comment line'] = [$yaml, $expected];
2113 $yaml = <<<YAML
2125 $tests['mapping in sequence starting on a new line'] = [$yaml, $expected];
2127 $yaml = <<<YAML
2137 $tests['blank line at the beginning of an indented mapping value'] = [$yaml, $expected];