Completed
Push — master ( 1bbcf8...109a6d )
by Peter
26:01
created

AppExtensionTest::testMarkdownToHtml()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 7
rs 9.4285
cc 1
eloc 5
nc 1
nop 2
1
<?php
2
3
namespace Tests\AppBundle\Twig;
4
5
use AppBundle\Twig\AppExtension;
6
use Mni\FrontYAML\Parser;
7
8
class AppExtensionTest extends \PHPUnit_Framework_TestCase
9
{
10
    /**
11
     * @dataProvider markdownProvider
12
     */
13
    public function testMarkdownToHtml($md, $expected)
14
    {
15
        $parser = new Parser();
16
        $appExtension = new AppExtension($parser);
17
        $html = $appExtension->markdownToHtml($md);
18
        $this->assertEquals($html, $expected);
19
    }
20
21
    public static function markdownProvider()
22
    {
23
        return [
24
            [file_get_contents(__DIR__.'/../Fixtures/content_1.md'), file_get_contents(__DIR__.'/../Fixtures/content_1.html')]
25
        ];
26
    }
27
}