1
0
mirror of https://github.com/erusev/parsedown.git synced 2023-08-10 21:13:06 +03:00

replace tabs with spaces

This commit is contained in:
Emanuil Rusev 2014-04-17 13:34:06 +03:00
parent e0901ee9c7
commit e5dc563804

View File

@ -14,30 +14,30 @@ class Test extends PHPUnit_Framework_TestCase
private $dataDir;
/**
* @dataProvider data
*/
function test_($filename)
{
$markdown = file_get_contents($this->dataDir . $filename . '.md');
* @dataProvider data
*/
function test_($filename)
{
$markdown = file_get_contents($this->dataDir . $filename . '.md');
$expectedMarkup = file_get_contents($this->dataDir . $filename . '.html');
$expectedMarkup = file_get_contents($this->dataDir . $filename . '.html');
$expectedMarkup = str_replace("\r\n", "\n", $expectedMarkup);
$expectedMarkup = str_replace("\r", "\n", $expectedMarkup);
$expectedMarkup = str_replace("\r\n", "\n", $expectedMarkup);
$expectedMarkup = str_replace("\r", "\n", $expectedMarkup);
$actualMarkup = Parsedown::instance()->text($markdown);
$actualMarkup = Parsedown::instance()->text($markdown);
$this->assertEquals($expectedMarkup, $actualMarkup);
}
$this->assertEquals($expectedMarkup, $actualMarkup);
}
function data()
{
$data = array();
function data()
{
$data = array();
$Folder = new DirectoryIterator($this->dataDir);
$Folder = new DirectoryIterator($this->dataDir);
foreach ($Folder as $File)
{
foreach ($Folder as $File)
{
/** @var $File DirectoryIterator */
if ( ! $File->isFile())
@ -60,8 +60,8 @@ class Test extends PHPUnit_Framework_TestCase
{
$data []= array($basename);
}
}
}
return $data;
}
return $data;
}
}