Example #1
0
 public function testWrite()
 {
     $data = [['key1' => 'value1'], ['key2' => 'value2']];
     $fileReader = new DummyFileReader();
     $yaml = new Yaml($fileReader, new Parser(), new Dumper(), 2);
     $yaml->write($data);
     $this->assertSame("-\n    key1: value1\n-\n    key2: value2\n", $fileReader->read());
 }