|
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\lib; |
|
12
|
|
|
|
|
13
|
|
|
use hiqdev\chkipper\lib\Commit; |
|
14
|
|
|
use hiqdev\chkipper\lib\History; |
|
15
|
|
|
use hiqdev\chkipper\lib\Note; |
|
16
|
|
|
use hiqdev\chkipper\lib\parsers\MarkdownParser; |
|
17
|
|
|
use hiqdev\chkipper\lib\Tag; |
|
18
|
|
|
|
|
19
|
|
|
ini_set('xdebug.var_display_max_depth', 15); |
|
20
|
|
|
ini_set('xdebug.var_display_max_children', 256); |
|
21
|
|
|
ini_set('xdebug.var_display_max_data', 1024); |
|
22
|
|
|
|
|
23
|
|
|
/** |
|
24
|
|
|
* Markdown history parser test case. |
|
25
|
|
|
* |
|
26
|
|
|
* @author Andrii Vasyliev <[email protected]> |
|
27
|
|
|
*/ |
|
28
|
|
|
class MarkdownParserTest extends \PHPUnit\Framework\TestCase |
|
|
|
|
|
|
29
|
|
|
{ |
|
30
|
|
|
/** |
|
31
|
|
|
* @var MarkdownParser |
|
32
|
|
|
*/ |
|
33
|
|
|
protected $object; |
|
34
|
|
|
|
|
35
|
|
|
protected $note = 'Added basics'; |
|
36
|
|
|
protected $hash = 'b22f8ac'; |
|
37
|
|
|
protected $date = '2016-06-11'; |
|
38
|
|
|
protected $subject = 'inited'; |
|
39
|
|
|
protected $author = '@hiqsol'; |
|
40
|
|
|
protected $email = '[email protected]'; |
|
41
|
|
|
protected $label; |
|
42
|
|
|
protected $comment = ' - longer description for initial commit'; |
|
43
|
|
|
|
|
44
|
|
|
protected function setUp() |
|
45
|
|
|
{ |
|
46
|
|
|
$this->label = $this->date . ' ' . $this->subject . ' [' . $this->author . ']'; |
|
47
|
|
|
$this->object = new MarkdownParser(new Config()); |
|
48
|
|
|
} |
|
49
|
|
|
|
|
50
|
|
|
protected function tearDown() |
|
51
|
|
|
{ |
|
52
|
|
|
} |
|
53
|
|
|
|
|
54
|
|
|
public function testParsePath() |
|
55
|
|
|
{ |
|
56
|
|
|
$this->object->parsePath(__DIR__ . '/minimal.md'); |
|
57
|
|
|
$history = new History($this->object->getConfig()); |
|
58
|
|
|
$history->setHeaders([ |
|
59
|
|
|
'hiqdev/chkipper commits history', |
|
60
|
|
|
'-------------------------------', |
|
61
|
|
|
]); |
|
62
|
|
|
$history->setTags([ |
|
63
|
|
|
$this->object->getLastTag() => new Tag( |
|
64
|
|
|
$this->object->getLastTag(), |
|
65
|
|
|
null, |
|
66
|
|
|
[ |
|
67
|
|
|
$this->note => new Note($this->note, [ |
|
68
|
|
|
$this->hash => new Commit($this->hash, $this->label, [$this->comment]), |
|
69
|
|
|
]), |
|
70
|
|
|
] |
|
71
|
|
|
), |
|
72
|
|
|
$this->object->getInitTag() => new Tag($this->object->getInitTag(), $this->date), |
|
73
|
|
|
]); |
|
74
|
|
|
$history->addHash($this->hash); |
|
75
|
|
|
$history->setLinks([ |
|
76
|
|
|
'Under development' => 'https://github.com/hiqdev/chkipper/releases', |
|
77
|
|
|
'Development started' => 'https://github.com/hiqdev/chkipper/releases', |
|
78
|
|
|
'[email protected]' => 'https://github.com/hiqsol', |
|
79
|
|
|
'@hiqsol' => 'https://github.com/hiqsol', |
|
80
|
|
|
'b22f8ac' => 'https://github.com/hiqdev/chkipper/commit/b22f8ac', |
|
81
|
|
|
]); |
|
82
|
|
|
$this->assertEquals($history, $this->object->getHistory()); |
|
83
|
|
|
} |
|
84
|
|
|
} |
|
85
|
|
|
|
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths