decode() public method

public decode ( $data )
Example #1
0
 public function testDecoding()
 {
     $formatter = new YAML();
     $data = array('name' => 'Joe', 'age' => 21, 'employed' => true);
     $raw = file_get_contents(__DIR__ . '/fixtures/joe.yaml');
     $this->assertEquals($data, $formatter->decode($raw));
 }