4 * This file is part of the Symfony package.
6 * (c) Fabien Potencier <fabien@symfony.com>
8 * For the full copyright and license information, please view the LICENSE
9 * file that was distributed with this source code.
12 namespace Symfony\Component\Config\Tests\Definition\Dumper;
14 use PHPUnit\Framework\TestCase;
15 use Symfony\Component\Config\Definition\Dumper\YamlReferenceDumper;
16 use Symfony\Component\Config\Tests\Fixtures\Configuration\ExampleConfiguration;
18 class YamlReferenceDumperTest extends TestCase
20 public function testDumper()
22 $configuration = new ExampleConfiguration();
24 $dumper = new YamlReferenceDumper();
26 $this->assertEquals($this->getConfigurationAsString(), $dumper->dump($configuration));
29 private function getConfigurationAsString()
38 scalar_default: default
39 scalar_array_empty: []
40 scalar_array_defaults:
45 scalar_required: ~ # Required
46 node_with_a_looong_name: ~
47 enum_with_default: this # One of "this"; "that"
48 enum: ~ # One of "this"; "that"
56 # multi-line info text
57 # which should be indented
58 child3: ~ # Example: example setting
62 # Prototype: Parameter name