Skip to content

Commit

Permalink
test: with 2 space indent
Browse files Browse the repository at this point in the history
  • Loading branch information
adhocore committed Oct 26, 2017
1 parent 69edd26 commit 54a000a
Showing 1 changed file with 20 additions and 5 deletions.
25 changes: 20 additions & 5 deletions tests/src/HtmlUpTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,32 @@ class HtmlUpTest extends PHPUnit_Framework_TestCase
/**
* @dataProvider dataSrc
*/
public function testAll()
public function testAllWith4spaces($testName, $markdown, $expected)
{
list($testName, $markdown, $expectedMarkup) = func_get_args();
$actualMarkup = (string) new HtmlUp($markdown);
$actualMarkup = (string) new HtmlUp($markdown, 4);

$this->assertion($testName, $expectedMarkup, $actualMarkup);
$this->assertion($testName, $expected, $actualMarkup);
}

/**
* @dataProvider dataSrc
*/
public function testAllWith2spaces($testName, $markdown, $expected)
{
$actualMarkup = (string) new HtmlUp(str_replace(' ', ' ', $markdown), 2);

$this->assertion($testName, $expected, $actualMarkup);
}

public function testParseWithArg()
{
$htmlup = new HtmlUp;
$htmlup = new HtmlUp('paragraph');

$this->assertion(
'Parse constructor injected markdown',
'<p>paragraph</p>',
(string) $htmlup
);

$this->assertion(
'Parse the markdown provided in runtime',
Expand Down

0 comments on commit 54a000a

Please sign in to comment.