el = new EditLib(); } protected function tearDown(): void { } /** * Test bullet lists * * Test single lines with different numbers of '*' * * @group marked-as-skipped */ public function testBulletList(): void { $this->markTestSkipped("As of 2013-10-02, this test is broken, and nobody knows how to fix it. Mark as Skipped for now."); /* * *Item 1 * *Item 2 */ $inData = "*Item 1\n*Item 2\n"; $ex = '
\n'; $out = $this->el->parseToWysiwyg($inData); $out = preg_replace('/\n/', '\n', $out); // fix LF encoding for comparison $this->assertEquals($ex, $out); /* * *Item 1 * **Item 1a * *Item 2 */ $inData = "*Item 1\n**Item 1a\n*Item 2\n"; $ex = '
\n'; $out = $this->el->parseToWysiwyg($inData); $out = preg_replace('/\n/', '\n', $out); // fix LF encoding for comparison $this->assertEquals($ex, $out); } /** * Test the continuation of bullet lists * * Test level one and two * * @group marked-as-skipped */ public function testBulletListContinuation(): void { $this->markTestSkipped("As of 2013-10-02, this test is broken, and nobody knows how to fix it. Mark as Skipped for now."); /* * *Item 1 * +Continuation * *Item 2 */ $inData = "*Item 1\n+Continuation\n*Item 2\n"; $ex = '
\n'; $out = $this->el->parseToWysiwyg($inData); $out = preg_replace('/\n/', '\n', $out); // fix LF encoding for comparison $this->assertEquals($ex, $out); /* * **Item 1 * ++Continuation * **Item 2 */ $inData = "**Item 1\n++Continuation\n**Item 2\n"; $ex = '
\n'; $out = $this->el->parseToWysiwyg($inData); $out = preg_replace('/\n/', '\n', $out); // fix LF encoding for comparison $this->assertEquals($ex, $out); } /** * Test numbered lists * * Test single lines with different numbers of '#' * * @group marked-as-skipped */ public function testNumberedList(): void { $this->markTestSkipped("As of 2013-10-02, this test is broken, and nobody knows how to fix it. Mark as Skipped for now."); /* * #Item 1 * #Item 2 */ $inData = "#Item 1\n#Item 2\n"; $ex = '
  1. Item 1\n'; $ex .= '
  2. Item 2\n'; $ex .= '

\n'; $out = $this->el->parseToWysiwyg($inData); $out = preg_replace('/\n/', '\n', $out); // fix LF encoding for comparison $this->assertEquals($ex, $out); /* * #Item 1 * ##Item 1a * #Item 2 */ $inData = "#Item 1\n##Item 1a\n#Item 2\n"; $ex = '
  1. Item 1\n'; $ex .= '
    1. Item 1a\n'; $ex .= '
  2. Item 2\n'; $ex .= '

\n'; $out = $this->el->parseToWysiwyg($inData); $out = preg_replace('/\n/', '\n', $out); // fix LF encoding for comparison $this->assertEquals($ex, $out); } /** * Test the continuation of numbered lists * * Test level one and two * * @group marked-as-skipped */ public function testNumberedListContinuation(): void { $this->markTestSkipped("As of 2013-10-02, this test is broken, and nobody knows how to fix it. Mark as Skipped for now."); /* * #Item 1 * +Continuation * #Item 2 */ $inData = "#Item 1\n+Continuation\n#Item 2\n"; $ex = '
  1. Item 1\n'; $ex .= '
    Continuation\n'; $ex .= '
  2. Item 2\n'; $ex .= '

\n'; $out = $this->el->parseToWysiwyg($inData); $out = preg_replace('/\n/', '\n', $out); // fix LF encoding for comparison $this->assertEquals($ex, $out); /* * ##Item 1 * ++Continuation * ##Item 2 */ $inData = "##Item 1\n++Continuation\n##Item 2\n"; $ex = '
    1. Item 1\n'; $ex .= '
      Continuation\n'; $ex .= '
    2. Item 2\n'; $ex .= '

\n'; $out = $this->el->parseToWysiwyg($inData); $out = preg_replace('/\n/', '\n', $out); // fix LF encoding for comparison $this->assertEquals($ex, $out); } }