Completed
Push — master ( cefe8d...0ca202 )
by Andrii
03:36
created

MarkdownRendererTest::tearDown()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 3
rs 10
c 0
b 0
f 0
cc 1
eloc 1
nc 1
nop 0
1
<?php
2
/**
3
 * Changelog keeper
4
 *
5
 * @link      https://github.com/hiqdev/chkipper
6
 * @package   chkipper
7
 * @license   BSD-3-Clause
8
 * @copyright Copyright (c) 2016-2017, HiQDev (http://hiqdev.com/)
9
 */
10
11
namespace hiqdev\chkipper\tests\unit\history;
12
13
use hiqdev\chkipper\history\MarkdownParser;
14
use hiqdev\chkipper\history\MarkdownRenderer;
15
16
/**
17
 * Markdown history renderer test case.
18
 *
19
 * @author Andrii Vasyliev <[email protected]>
20
 */
21
class MarkdownRendererTest extends \PHPUnit_Framework_TestCase
22
{
23
    /**
24
     * @var MarkdownRenderer
25
     */
26
    protected $object;
27
28
    protected function setUp()
29
    {
30
        $config = new Config();
31
        $this->object = new MarkdownRenderer($config);
32
    }
33
34
    protected function tearDown()
35
    {
36
    }
37
38
    public function testRender()
39
    {
40
        $path = __DIR__ . '/minimal.md';
41
        $parser = new MarkdownParser($this->object->getConfig());
42
        $history = $parser->parsePath($path);
43
        $text = $this->object->render($history);
44
        $this->assertEquals(file_get_contents($path), $text);
45
    }
46
}
47