X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=vendor%2Fcebe%2Fmarkdown%2Ftests%2FGithubMarkdownTest.php;fp=vendor%2Fcebe%2Fmarkdown%2Ftests%2FGithubMarkdownTest.php;h=4367c60258e724e763148f5a5673f7123e646a49;hp=0000000000000000000000000000000000000000;hb=a2bd1bf0c2c1f1a17d188f4dc0726a45494cefae;hpb=57c063afa3f66b07c4bbddc2d6129a96d90f0aad
diff --git a/vendor/cebe/markdown/tests/GithubMarkdownTest.php b/vendor/cebe/markdown/tests/GithubMarkdownTest.php
new file mode 100644
index 000000000..4367c6025
--- /dev/null
+++ b/vendor/cebe/markdown/tests/GithubMarkdownTest.php
@@ -0,0 +1,57 @@
+
+ * @group github
+ */
+class GithubMarkdownTest extends BaseMarkdownTest
+{
+ public function createMarkdown()
+ {
+ return new GithubMarkdown();
+ }
+
+ public function getDataPaths()
+ {
+ return [
+ 'markdown-data' => __DIR__ . '/markdown-data',
+ 'github-data' => __DIR__ . '/github-data',
+ ];
+ }
+
+ public function testNewlines()
+ {
+ $markdown = $this->createMarkdown();
+ $this->assertEquals("This is text
\nnewline\nnewline.", $markdown->parseParagraph("This is text \nnewline\nnewline."));
+ $markdown->enableNewlines = true;
+ $this->assertEquals("This is text
\nnewline
\nnewline.", $markdown->parseParagraph("This is text \nnewline\nnewline."));
+
+ $this->assertEquals("
This is text
\nnewline
\nnewline.