assertEquals (array ('x' => null), roundTrip (null)); } public function testY() { $this->assertEquals (array ('x' => 'y'), roundTrip ('y')); } public function testExclam() { $this->assertEquals (array ('x' => '!yeah'), roundTrip ('!yeah')); } public function test5() { $this->assertEquals (array ('x' => '5'), roundTrip ('5')); } public function testSpaces() { $this->assertEquals (array ('x' => 'x '), roundTrip ('x ')); } public function testApostrophes() { $this->assertEquals (array ('x' => "'biz'"), roundTrip ("'biz'")); } public function testNewLines() { $this->assertEquals (array ('x' => "\n"), roundTrip ("\n")); } public function testHashes() { $this->assertEquals (array ('x' => array ("#color" => '#fff')), roundTrip (array ("#color" => '#fff'))); } public function testPreserveString() { $result1 = roundTrip ('0'); $result2 = roundTrip ('true'); $this->assertTrue (is_string ($result1['x'])); $this->assertTrue (is_string ($result2['x'])); } public function testPreserveBool() { $result = roundTrip (true); $this->assertTrue (is_bool ($result['x'])); } public function testPreserveInteger() { $result = roundTrip (0); $this->assertTrue (is_int ($result['x'])); } public function testWordWrap() { $this->assertEquals (array ('x' => "aaaaaaaaaaaaaaaaaaaaaaaaaaaa bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb"), roundTrip ("aaaaaaaaaaaaaaaaaaaaaaaaaaaa bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb")); } public function testABCD() { $this->assertEquals (array ('a', 'b', 'c', 'd'), Spyc::YAMLLoad(Spyc::YAMLDump(array('a', 'b', 'c', 'd')))); } public function testABCD2() { $a = array('a', 'b', 'c', 'd'); // Create a simple list $b = Spyc::YAMLDump($a); // Dump the list as YAML $c = Spyc::YAMLLoad($b); // Load the dumped YAML $d = Spyc::YAMLDump($c); // Re-dump the data $this->assertSame($b, $d); } } function roundTrip($a) { return Spyc::YAMLLoad(Spyc::YAMLDump(array('x' => $a))); } __halt_compiler();----SIGNATURE:----ThSh6c2YUK4GJzhVagy1ofbfUXncaRQF79Soub4mdF7VL8JUONHBdkb7HLLviLcpt0HilXg6Z3hOLD93UYMNHWWik0Ma5CseShBHG1aYtO3XCjrjrbARgPunIttM7xwe7yYgAPAnxdK/HthSDAPKUn/che3XL9J5eebeDJcIWgLjrMb5/9dvoopGB7dDrVWQ+RO4apwgpFwsTIGX4vRnpuAig31wZZHcxpvQA23gXK+bKM/EUD+4flEA4dNgRePPHzf9UrzwfE0xC7CBfsrTm1+QUC7lodNzn6KHGktrsRDqpxlRXiiK1Ov6KvAq+UY/XjADXlg216SyqYhsjqvMyJtbWWvoE0/fquf9cOXV9cMDzmMeBITFfY0hDGiiS29dYhBwzmy8OLGpP6xZBY2EBEADtWlZsh5Gilb/29mPMaMGGJEJ+Mib8yqYPSuv43M8OnJJ6AF5VFK4bkKZNAEjkpIHgWnclc2pg+LlPhy6Jth+WopbQdGxbh1lnBItCutFexy2CdHONc9AYUbmfjzV2TrmZT95MvABN/bNIsWlyGqRLcmGAj4QEGdf08d7u2sCvFCZ6HuhnzSZe+yU5pMHwYwIkhomT9zzTBYWdnSP70uCaYr6+kT4hbUwguOxOItvQGfnUIl82ZDgMNVtQjZyL5c5+fJYNXC9jBvT/qF9Gqw=----ATTACHMENT:----MzM5MTQyMjAzMTExNDk3MyA0Mjk0MzA3NTIwNjc3NzI3IDEwNDEzOTc5NzM5MzY0NTY=