Yaffs site version 1.1
[yaffs-website] / vendor / symfony / config / Tests / Definition / Dumper / YamlReferenceDumperTest.php
1 <?php
2
3 /*
4  * This file is part of the Symfony package.
5  *
6  * (c) Fabien Potencier <fabien@symfony.com>
7  *
8  * For the full copyright and license information, please view the LICENSE
9  * file that was distributed with this source code.
10  */
11
12 namespace Symfony\Component\Config\Tests\Definition\Dumper;
13
14 use PHPUnit\Framework\TestCase;
15 use Symfony\Component\Config\Definition\Dumper\YamlReferenceDumper;
16 use Symfony\Component\Config\Tests\Fixtures\Configuration\ExampleConfiguration;
17
18 class YamlReferenceDumperTest extends TestCase
19 {
20     public function testDumper()
21     {
22         $configuration = new ExampleConfiguration();
23
24         $dumper = new YamlReferenceDumper();
25
26         $this->assertContains($this->getConfigurationAsString(), $dumper->dump($configuration));
27         $this->markTestIncomplete('The Yaml Dumper currently does not support prototyped arrays');
28     }
29
30     private function getConfigurationAsString()
31     {
32         return <<<'EOL'
33 acme_root:
34     boolean:              true
35     scalar_empty:         ~
36     scalar_null:          null
37     scalar_true:          true
38     scalar_false:         false
39     scalar_default:       default
40     scalar_array_empty:   []
41     scalar_array_defaults:
42
43         # Defaults:
44         - elem1
45         - elem2
46     scalar_required:      ~ # Required
47     node_with_a_looong_name: ~
48     enum_with_default:    this # One of "this"; "that"
49     enum:                 ~ # One of "this"; "that"
50
51     # some info
52     array:
53         child1:               ~
54         child2:               ~
55
56         # this is a long
57         # multi-line info text
58         # which should be indented
59         child3:               ~ # Example: example setting
60     parameters:
61
62         # Prototype: Parameter name
63         name:                 ~
64 EOL;
65     }
66 }