Lines Matching refs:expected

40     public function testSpecifications($expected, $yaml, $comment)  argument
42 $this->assertEquals($expected, var_export($this->parser->parse($yaml), true), $comment);
101 $expected = [
105 $tests['Literal block chomping strip with single trailing newline'] = [$expected, $yaml];
118 $expected = [
122 $tests['Literal block chomping strip with multiple trailing newlines'] = [$expected, $yaml];
129 $expected = [];
130 …iteral block chomping strip with multiple trailing newlines after a 1-liner'] = [$expected, $yaml];
140 $expected = [
144 $tests['Literal block chomping strip without trailing newline'] = [$expected, $yaml];
155 $expected = [
159 $tests['Literal block chomping clip with single trailing newline'] = [$expected, $yaml];
172 $expected = [
176 $tests['Literal block chomping clip with multiple trailing newlines'] = [$expected, $yaml];
185 $expected = [
192 …l block chomping clip with embedded blank line inside unindented collection'] = [$expected, $yaml];
202 $expected = [
206 $tests['Literal block chomping clip without trailing newline'] = [$expected, $yaml];
217 $expected = [
221 $tests['Literal block chomping keep with single trailing newline'] = [$expected, $yaml];
234 $expected = [
238 $tests['Literal block chomping keep with multiple trailing newlines'] = [$expected, $yaml];
248 $expected = [
252 $tests['Literal block chomping keep without trailing newline'] = [$expected, $yaml];
263 $expected = [
267 $tests['Folded block chomping strip with single trailing newline'] = [$expected, $yaml];
280 $expected = [
284 $tests['Folded block chomping strip with multiple trailing newlines'] = [$expected, $yaml];
294 $expected = [
298 $tests['Folded block chomping strip without trailing newline'] = [$expected, $yaml];
309 $expected = [
313 $tests['Folded block chomping clip with single trailing newline'] = [$expected, $yaml];
326 $expected = [
330 $tests['Folded block chomping clip with multiple trailing newlines'] = [$expected, $yaml];
340 $expected = [
344 $tests['Folded block chomping clip without trailing newline'] = [$expected, $yaml];
355 $expected = [
359 $tests['Folded block chomping keep with single trailing newline'] = [$expected, $yaml];
372 $expected = [
376 $tests['Folded block chomping keep with multiple trailing newlines'] = [$expected, $yaml];
386 $expected = [
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));
417 $expected = [
421 $this->assertSame($expected, $this->parser->parse($yaml));
445 public function testObjectForMap($yaml, $expected) argument
449 $this->assertEquals($expected, $this->parser->parse($yaml, $flags));
460 $expected = new \stdClass();
461 $expected->foo = new \stdClass();
462 $expected->foo->fiz = ['cat'];
463 $tests['mapping'] = [$yaml, $expected];
466 $expected = new \stdClass();
467 $expected->foo = 'bar';
468 $expected->fiz = 'cat';
469 $tests['inline-mapping'] = [$yaml, $expected];
472 $expected = new \stdClass();
473 $expected->foo = 'bar';
474 $expected->baz = 'foobar';
475 $tests['object-for-map-is-applied-after-parsing'] = [$yaml, $expected];
482 $expected = new \stdClass();
483 $expected->array = [];
484 $expected->array[0] = new \stdClass();
485 $expected->array[0]->key = 'one';
486 $expected->array[1] = new \stdClass();
487 $expected->array[1]->key = 'two';
488 $tests['nest-map-and-sequence'] = [$yaml, $expected];
495 $expected = new \stdClass();
496 $expected->map = new \stdClass();
497 $expected->map->{1} = 'one';
498 $expected->map->{2} = 'two';
499 $tests['numeric-keys'] = [$yaml, $expected];
506 $expected = new \stdClass();
507 $expected->map = new \stdClass();
508 $expected->map->{0} = 'one';
509 $expected->map->{1} = 'two';
510 $tests['zero-indexed-numeric-keys'] = [$yaml, $expected];
532 $expected = [
536 $this->assertSame($expected, $this->parser->parse($yaml));
639 $expected = [
653 $this->assertSame($expected, $this->parser->parse($yaml));
665 $expected = [
672 $this->assertSame($expected, $this->parser->parse($yaml));
686 $expected = [
693 $this->assertSame($expected, $this->parser->parse($yaml));
739 $expected = [
743 $this->assertSame($expected, $this->parser->parse($yaml));
750 $expected = [
754 $this->assertSame($expected, $this->parser->parse($yaml));
808 $expected = [
813 $this->assertSame($expected, Yaml::parse($input));
826 $expected = [
831 $this->assertSame($expected, Yaml::parse($input));
1105 $expected = [
1114 $this->assertEquals($expected, $this->parser->parse($yaml));
1167 $expected = [
1186 $tests[] = [$yaml, $expected];
1203 $expected = [
1231 $tests[] = [$yaml, $expected];
1243 $expected = [
1253 $tests[] = [$yaml, $expected];
1263 $expected = [
1269 $tests[] = [$yaml, $expected];
1526 $expected = [
1533 $this->assertSame($expected, $this->parser->parse($yaml));
1543 $expected = [
1547 $this->assertSame($expected, $this->parser->parse($yaml));
1571 public function testParseMultiLineMappingValue($yaml, $expected, $parseError) argument
1573 $this->assertEquals($expected, $this->parser->parse($yaml));
1588 $expected = [
1596 $tests[] = [$yaml, $expected, false];
1602 $expected = 'bar "foo"';
1604 $tests[] = [$yaml, $expected, false];
1610 $expected = 'bar "foo';
1612 $tests[] = [$yaml, $expected, false];
1619 $expected = "bar\n'foo'";
1621 $tests[] = [$yaml, $expected, false];
1628 $expected = "bar\nfoo'";
1630 $tests[] = [$yaml, $expected, false];
1643 public function testCustomTagSupport($expected, $yaml) argument
1645 $this->assertEquals($expected, $this->parser->parse($yaml, Yaml::PARSE_CUSTOM_TAGS));
1817 $tests[] = [var_export($expected, true), $test['yaml'], $test['test']];
1866 $expected = [
1877 $this->assertSame($expected, $this->parser->parse($yaml, Yaml::PARSE_CONSTANT));
1896 $expected = (object) [
1914 $this->assertEquals($expected, $this->parser->parse($yaml, Yaml::PARSE_OBJECT_FOR_MAP));
1970 $expected = [
1983 $this->assertSame($expected, $this->parser->parse($yaml));
1998 $expected = (object) [
2011 $this->assertEquals($expected, $this->parser->parse($yaml, Yaml::PARSE_OBJECT_FOR_MAP));
2071 public function testParseIndentedMappings($yaml, $expected) argument
2073 $this->assertSame($expected, $this->parser->parse($yaml));
2086 $expected = [
2094 $tests['comment line is first line in indented block'] = [$yaml, $expected];
2102 $expected = [
2111 $tests['mapping value on new line starting with a comment line'] = [$yaml, $expected];
2118 $expected = [
2125 $tests['mapping in sequence starting on a new line'] = [$yaml, $expected];
2132 $expected = [
2137 $tests['blank line at the beginning of an indented mapping value'] = [$yaml, $expected];