Completed
Push — master ( 59f3c3...4dab06 )
by Andrii
02:30
created

GitLogParserTest::setUp()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

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