diff options
author | Moritz Kaspar Rudert (mortzu) <me@mortzu.de> | 2014-09-08 08:16:09 +0200 |
---|---|---|
committer | Moritz Kaspar Rudert (mortzu) <me@mortzu.de> | 2014-09-08 08:16:09 +0200 |
commit | 5d8615a958b20c59a7ed00be0aa2ef8f2f9cc233 (patch) | |
tree | 50b9c3940c2749b8e9b38db6c8d92cb28ec778fa /vendor/parsedown-0.9.0/tests/Test.php | |
parent | 64a341e084c5c8c8a0dc63a25d80429156d6a705 (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.php | 55 |
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 |