monospace text." * See http://www.wikicreole.org/wiki/CreoleAdditions, section "Monospace" */ public function test_monospace() { $info = array(); $expected = "\n

\nThis is monospace text. \n

\n"; $instructions = p_get_instructions('This is ##monospace## text.'); $xhtml = p_render('xhtml', $instructions, $info); $this->assertEquals($expected, $xhtml); } /** * Test superscript XHTML generation. * Recommended output: "This is superscripted text." * See http://www.wikicreole.org/wiki/CreoleAdditions, section "Superscript" */ public function test_superscript() { $info = array(); $expected = "\n

\nThis is superscripted text. \n

\n"; $instructions = p_get_instructions('This is ^^superscripted^^ text.'); $xhtml = p_render('xhtml', $instructions, $info); $this->assertEquals($expected, $xhtml); } /** * Test subscript XHTML generation. * Recommended output: "This is subscripted text." * See http://www.wikicreole.org/wiki/CreoleAdditions, section "Superscript" */ public function test_subscript() { $info = array(); $expected = "\n

\nThis is subscripted text. \n

\n"; $instructions = p_get_instructions('This is ,,subscripted,, text.'); $xhtml = p_render('xhtml', $instructions, $info); $this->assertEquals($expected, $xhtml); } /** * Test according to examples in: * http://www.wikicreole.org/attach/Creole1.0TestCases/creole1.0test.txt * * Test heading 1, no trailing equal signs */ public function test_heading1_no_trailing_equal() { $info = array(); $expected = "\n

Top-level heading (1)

\n
\n\n
\n"; $instructions = p_get_instructions('= Top-level heading (1)'); $xhtml = p_render('xhtml', $instructions, $info); $this->assertEquals($expected, $xhtml); } /** * Test according to examples in: * http://www.wikicreole.org/attach/Creole1.0TestCases/creole1.0test.txt * * Test heading 2, no trailing equal signs */ public function test_heading2_no_trailing_equal() { $info = array(); $expected = "\n

This a test for creole 0.1 (2)

\n
\n\n
\n"; $instructions = p_get_instructions('== This a test for creole 0.1 (2)'); $xhtml = p_render('xhtml', $instructions, $info); $this->assertEquals($expected, $xhtml); } /** * Test according to examples in: * http://www.wikicreole.org/attach/Creole1.0TestCases/creole1.0test.txt * * Test heading 3, no trailing equal signs */ public function test_heading3_no_trailing_equal() { $info = array(); $expected = "\n

This is a Subheading (3)

\n
\n\n
\n"; $instructions = p_get_instructions('=== This is a Subheading (3)'); $xhtml = p_render('xhtml', $instructions, $info); $this->assertEquals($expected, $xhtml); } /** * Test according to examples in: * http://www.wikicreole.org/attach/Creole1.0TestCases/creole1.0test.txt * * Test heading 4, no trailing equal signs */ public function test_heading4_no_trailing_equal() { $info = array(); $expected = "\n

Subsub (4)

\n
\n\n
\n"; $instructions = p_get_instructions('==== Subsub (4)'); $xhtml = p_render('xhtml', $instructions, $info); $this->assertEquals($expected, $xhtml); } /** * Test according to examples in: * http://www.wikicreole.org/attach/Creole1.0TestCases/creole1.0test.txt * * Test heading 5, no trailing equal signs */ public function test_heading5_no_trailing_equal() { $info = array(); $expected = "\n
Subsubsub (5)
\n
\n\n
\n"; $instructions = p_get_instructions('===== Subsubsub (5)'); $xhtml = p_render('xhtml', $instructions, $info); $this->assertEquals($expected, $xhtml); } /** * Test according to examples in: * http://www.wikicreole.org/attach/Creole1.0TestCases/creole1.0test.txt * * Test heading 1 */ public function test_heading1() { $info = array(); $expected = "\n

Top-level heading (1)

\n
\n\n
\n"; $instructions = p_get_instructions('= Top-level heading (1) ='); $xhtml = p_render('xhtml', $instructions, $info); $this->assertEquals($expected, $xhtml); } /** * Test according to examples in: * http://www.wikicreole.org/attach/Creole1.0TestCases/creole1.0test.txt * * Test heading 2 */ public function test_heading2() { $info = array(); $expected = "\n

This a test for creole 0.1 (2)

\n
\n\n
\n"; $instructions = p_get_instructions('== This a test for creole 0.1 (2) =='); $xhtml = p_render('xhtml', $instructions, $info); $this->assertEquals($expected, $xhtml); } /** * Test according to examples in: * http://www.wikicreole.org/attach/Creole1.0TestCases/creole1.0test.txt * * Test heading 3 */ public function test_heading3() { $info = array(); $expected = "\n

This is a Subheading (3)

\n
\n\n
\n"; $instructions = p_get_instructions('=== This is a Subheading (3) ==='); $xhtml = p_render('xhtml', $instructions, $info); $this->assertEquals($expected, $xhtml); } /** * Test according to examples in: * http://www.wikicreole.org/attach/Creole1.0TestCases/creole1.0test.txt * * Test heading 4 */ public function test_heading4() { $info = array(); $expected = "\n

Subsub (4)

\n
\n\n
\n"; $instructions = p_get_instructions('==== Subsub (4) ===='); $xhtml = p_render('xhtml', $instructions, $info); $this->assertEquals($expected, $xhtml); } /** * Test according to examples in: * http://www.wikicreole.org/attach/Creole1.0TestCases/creole1.0test.txt * * Test heading 5 */ public function test_heading5() { $info = array(); $expected = "\n
Subsubsub (5)
\n
\n\n
\n"; $instructions = p_get_instructions('===== Subsubsub (5) ====='); $xhtml = p_render('xhtml', $instructions, $info); $this->assertEquals($expected, $xhtml); } /** * Test according to examples in: * http://www.wikicreole.org/attach/Creole1.0TestCases/creole1.0test.txt * * Test inline bold and italic style and both styles combined */ public function test_bold_and_italic_inline() { $info = array(); $expected = "\n

\nYou can make things bold or italic or both or both. \n

\n"; $instructions = p_get_instructions('You can make things **bold** or //italic// or **//both//** or //**both**//.'); $xhtml = p_render('xhtml', $instructions, $info); $this->assertEquals($expected, $xhtml); } /** * Test according to examples in: * http://www.wikicreole.org/attach/Creole1.0TestCases/creole1.0test.txt * * Test bold multiline */ public function test_bold_multiline() { $info = array(); $expected = "\n

\nCharacter formatting extends across line breaks: bold, this is still bold. This line deliberately does not end in star-star.\n

\n\n

\nNot bold. Character formatting does not cross paragraph boundaries. \n

\n"; $source = "Character formatting extends across line breaks: **bold,\nthis is still bold. This line deliberately does not end in star-star.\n\nNot bold. Character formatting does not cross paragraph boundaries."; $instructions = p_get_instructions($source); $xhtml = p_render('xhtml', $instructions, $info); $this->assertEquals($expected, $xhtml); } }