public function testDumpWithQuotes() { $yaml = new Yaml(); $yaml->settingDumpForceQuotes = true; foreach ($this->files_to_test as $file) { $cont = $yaml->load($file); $dump = $yaml->dump($cont); $yaml_after_dump = $yaml->loadString($dump); $this->assertEquals($cont, $yaml_after_dump); } }
function roundTrip($a) { $yaml = new Yaml(); return $yaml->loadString($yaml->dump(array('x' => $a))); }