public function testStringEscapesSingleQuote() { $tb = new TomlBuilder(); $result = $tb->addValue('backspace', 'This string has a \\b backspace character.')->addValue('tab', 'This string has a \\t tab character.')->addValue('newline', 'This string has a \\n new line character.')->addValue('formfeed', 'This string has a \\f form feed character.')->addValue('carriage', 'This string has a \\r carriage return character.')->addValue('quote', 'This string has a \\" quote character.')->addValue('slash', 'This string has a \\/ slash character.')->addValue('backslash', 'This string has a \\ backslash character.')->getTomlString(); $this->assertNotNull(Toml::Parse($result)); }
/** * @expectedException \Yosymfony\Toml\Exception\DumpException */ public function testNullValue() { $tb = new TomlBuilder(); $result = $tb->addValue('theNull', null)->getTomlString(); }