public function test_lib_opml_render_minimal() { $str = libopml_render(array('body' => array(array('text' => 'test')))); $expected = <<<XML <?xml version="1.0" encoding="UTF-8"?> <opml version="2.0"> <head/> <body> <outline text="test"/> </body> </opml> XML; $this->assertEquals($str, $expected); }
\t</head> \t<body> <outline text="A" /> <outline text="Simple" /> <outline text="OPML" /> <outline text="String" /> \t</body> </opml> XML; try { $opml_array2 = libopml_parse_string($opml_string); echo '<pre>'; print_r($opml_array2); echo '<pre>'; } catch (LibOPML_Exception $e) { echo $e->getMessage(); } echo '<h1>Test libopml_render</h1>'; try { $opml_string = libopml_render($opml_array1); echo '<pre>'; echo htmlspecialchars($opml_string, ENT_NOQUOTES, 'UTF-8'); echo '<pre>'; } catch (LibOPML_Exception $e) { echo $e->getMessage(); } ?> </body> </html>