BaseMarkdownLatexTest.php 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <?php
  2. /**
  3. * @copyright Copyright (c) 2014 Carsten Brandt
  4. * @license https://github.com/cebe/markdown/blob/master/LICENSE
  5. * @link https://github.com/cebe/markdown#readme
  6. */
  7. namespace cebe\markdown\latex\tests;
  8. use cebe\markdown\tests\BaseMarkdownTest;
  9. /**
  10. * Base class for all Test cases.
  11. *
  12. * @author Carsten Brandt <mail@cebe.cc>
  13. */
  14. abstract class BaseMarkdownLatexTest extends BaseMarkdownTest
  15. {
  16. protected $outputFileExtension = '.tex';
  17. public function testUtf8()
  18. {
  19. $this->assertSame("абвгдеёжзийклмнопрстуфхцчшщъыьэюя\n\n", $this->createMarkdown()->parse('абвгдеёжзийклмнопрстуфхцчшщъыьэюя'));
  20. $this->assertSame("there is a charater, 配\n\n", $this->createMarkdown()->parse('there is a charater, 配'));
  21. $this->assertSame("Arabic Latter ``م (M)''\n\n", $this->createMarkdown()->parse('Arabic Latter "م (M)"'));
  22. $this->assertSame("電腦\n\n", $this->createMarkdown()->parse('電腦'));
  23. $this->assertSame('абвгдеёжзийклмнопрстуфхцчшщъыьэюя', $this->createMarkdown()->parseParagraph('абвгдеёжзийклмнопрстуфхцчшщъыьэюя'));
  24. $this->assertSame('there is a charater, 配', $this->createMarkdown()->parseParagraph('there is a charater, 配'));
  25. $this->assertSame("Arabic Latter ``م (M)''", $this->createMarkdown()->parseParagraph('Arabic Latter "م (M)"'));
  26. $this->assertSame('電腦', $this->createMarkdown()->parseParagraph('電腦'));
  27. }
  28. public function testInvalidUtf8()
  29. {
  30. // $m = $this->createMarkdown();
  31. // $this->assertEquals('\\lstinline|�|', $m->parseParagraph("`\x80`"));
  32. }
  33. /**
  34. * @dataProvider pregData
  35. */
  36. public function testPregReplaceR($input, $exptected, $pexpect = null)
  37. {
  38. $this->markTestSkipped();
  39. }
  40. }