summaryrefslogtreecommitdiff
path: root/vendor/parsedown-0.9.0/tests/Test.php
diff options
context:
space:
mode:
authorMoritz Kaspar Rudert (mortzu) <me@mortzu.de>2014-09-08 08:16:09 +0200
committerMoritz Kaspar Rudert (mortzu) <me@mortzu.de>2014-09-08 08:16:09 +0200
commit5d8615a958b20c59a7ed00be0aa2ef8f2f9cc233 (patch)
tree50b9c3940c2749b8e9b38db6c8d92cb28ec778fa /vendor/parsedown-0.9.0/tests/Test.php
parent64a341e084c5c8c8a0dc63a25d80429156d6a705 (diff)
moved external libraries into gitmodules
Diffstat (limited to 'vendor/parsedown-0.9.0/tests/Test.php')
-rw-r--r--vendor/parsedown-0.9.0/tests/Test.php55
1 files changed, 0 insertions, 55 deletions
diff --git a/vendor/parsedown-0.9.0/tests/Test.php b/vendor/parsedown-0.9.0/tests/Test.php
deleted file mode 100644
index e38974ce..00000000
--- a/vendor/parsedown-0.9.0/tests/Test.php
+++ /dev/null
@@ -1,55 +0,0 @@
-<?php
-
-include 'Parsedown.php';
-
-class Test extends PHPUnit_Framework_TestCase
-{
- const provider_dir = 'data/';
-
- /**
- * @dataProvider provider
- */
- function test_($markdown, $expected_markup)
- {
- $actual_markup = Parsedown::instance()->parse($markdown);
-
- $this->assertEquals($expected_markup, $actual_markup);
- }
-
- function provider()
- {
- $provider = array();
-
- $path = dirname(__FILE__).'/';
-
- $DirectoryIterator = new DirectoryIterator($path . '/' . self::provider_dir);
-
- foreach ($DirectoryIterator as $Item)
- {
- if ($Item->isFile())
- {
- $filename = $Item->getFilename();
-
- $extension = pathinfo($filename, PATHINFO_EXTENSION);
-
- if ($extension !== 'md')
- continue;
-
- $basename = $Item->getBasename('.md');
-
- $markdown = file_get_contents($path . '/' . self::provider_dir . $basename . '.md');
-
- if (!$markdown)
- continue;
-
- $expected_markup = file_get_contents($path . '/' . self::provider_dir . $basename . '.html');
- $expected_markup = str_replace("\r\n", "\n", $expected_markup);
- $expected_markup = str_replace("\r", "\n", $expected_markup);
-
- $provider [] = array($markdown, $expected_markup);
- }
- }
-
- return $provider;
- }
-} \ No newline at end of file