* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Config\Tests\Definition\Dumper; use PHPUnit\Framework\TestCase; use Symfony\Component\Config\Definition\Dumper\YamlReferenceDumper; use Symfony\Component\Config\Tests\Fixtures\Configuration\ExampleConfiguration; class YamlReferenceDumperTest extends TestCase { public function testDumper() { $configuration = new ExampleConfiguration(); $dumper = new YamlReferenceDumper(); $this->assertEquals($this->getConfigurationAsString(), $dumper->dump($configuration)); } public function provideDumpAtPath() { return array( 'Regular node' => array('scalar_true', << array('array', << array('array.child2', << array('cms_pages.page', << array('cms_pages.page.locale', <<assertSame(trim($expected), trim($dumper->dumpAtPath($configuration, $path))); } private function getConfigurationAsString() { return <<<'EOL' acme_root: boolean: true scalar_empty: ~ scalar_null: null scalar_true: true scalar_false: false scalar_default: default scalar_array_empty: [] scalar_array_defaults: # Defaults: - elem1 - elem2 scalar_required: ~ # Required scalar_deprecated: ~ # Deprecated (The child node "scalar_deprecated" at path "acme_root" is deprecated.) scalar_deprecated_with_message: ~ # Deprecated (Deprecation custom message for "scalar_deprecated_with_message" at "acme_root") node_with_a_looong_name: ~ enum_with_default: this # One of "this"; "that" enum: ~ # One of "this"; "that" # some info array: child1: ~ child2: ~ # this is a long # multi-line info text # which should be indented child3: ~ # Example: example setting scalar_prototyped: [] parameters: # Prototype: Parameter name name: ~ connections: # Prototype - user: ~ pass: ~ cms_pages: # Prototype page: # Prototype locale: title: ~ # Required path: ~ # Required pipou: # Prototype name: [] EOL; } } __halt_compiler();----SIGNATURE:----EXZfGHKQNE1HH26vHWNPC1fFc7MbK5ZTyomNU3zGkzOuVoT6kdO2uHT+B6s1EJsLwVeCSNz9gFz9IXBhk+xR2iHa8TLgteg6g30SHk/z9o0mODgtmJVsZ0iBzJyzLaX2/6kSGVcIsH291nKhhHLF79ZUvCEm33A8inYQqkX5bDpPd4KvHOZcefcPDr3v1x4Vl1V6/DpYQ3XX7B9fF3xHDS6d+IJEpKq9rc/JTDgMZAfrA9LzA5i9KcmQ9znbC08+1cKs1Y7z6NAuZW07wcfLYucFVvygRwK7hS8bYGOEBQ9tMB9Hm/mafkdv/eMAKB+k+Mw6eLtlfp0WoXO0F9h/xuPWiQvao0KHEz6m6mQPcm8y9Ea5KrPgMpwNdI/KTMb4U3JW/hfk6xokW6HkN2RSgDbWKeUXGGs9V2nK+299OFyNT8VoY9CqBU4F/TIIB/iItPI9kra3QOq2H4RX1jO6mZMcNKFe1Jkq36Zr61WQK2XPEGgEo38L731w2S0T2VEVunRnSNM8PVgnAxg3D5r2gtkTgQCFPyuEWrPOlMFk5ERkULe5+qJAW/3rRR6MO8xCzEHOudBC5DJZzGs8xuLZFLrHSn1ARhFzfCv9/Kwx0KEk2g0ZPalclmCuoGUscqhrjIuVzjznIGhPA2DTHWR8Z91ox1Byg+D26LSeJQm0x78=----ATTACHMENT:----NjQ4NTI5OTczNzQ4ODc5MCAxMzMwMDA5MTkzMTcxNzQwIDM4NTY2NDI4NzU0NjMzOTU=