Exemple #1
0
 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);
     }
 }
Exemple #2
0
function roundTrip($a)
{
    $yaml = new Yaml();
    return $yaml->loadString($yaml->dump(array('x' => $a)));
}