1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
/** |
4
|
|
|
* @file This file is part of the PdfParser library. |
5
|
|
|
* |
6
|
|
|
* @author Konrad Abicht <[email protected]> |
7
|
|
|
* |
8
|
|
|
* @date 2020-06-02 |
9
|
|
|
* |
10
|
|
|
* @author Sébastien MALOT <[email protected]> |
11
|
|
|
* |
12
|
|
|
* @date 2017-01-03 |
13
|
|
|
* |
14
|
|
|
* @license LGPLv3 |
15
|
|
|
* |
16
|
|
|
* @url <https://github.com/smalot/pdfparser> |
17
|
|
|
* |
18
|
|
|
* PdfParser is a pdf library written in PHP, extraction oriented. |
19
|
|
|
* Copyright (C) 2017 - Sébastien MALOT <[email protected]> |
20
|
|
|
* |
21
|
|
|
* This program is free software: you can redistribute it and/or modify |
22
|
|
|
* it under the terms of the GNU Lesser General Public License as published by |
23
|
|
|
* the Free Software Foundation, either version 3 of the License, or |
24
|
|
|
* (at your option) any later version. |
25
|
|
|
* |
26
|
|
|
* This program is distributed in the hope that it will be useful, |
27
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
28
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
29
|
|
|
* GNU Lesser General Public License for more details. |
30
|
|
|
* |
31
|
|
|
* You should have received a copy of the GNU Lesser General Public License |
32
|
|
|
* along with this program. |
33
|
|
|
* If not, see <http://www.pdfparser.org/sites/default/LICENSE.txt>. |
34
|
|
|
*/ |
35
|
|
|
|
36
|
|
|
namespace PHPUnitTests; |
37
|
|
|
|
38
|
|
|
use PHPUnit\Framework\TestCase as PHPTestCase; |
|
|
|
|
39
|
|
|
use Smalot\PdfParser\Config; |
40
|
|
|
use Smalot\PdfParser\Document; |
41
|
|
|
use Smalot\PdfParser\Element; |
42
|
|
|
use Smalot\PdfParser\Parser; |
43
|
|
|
|
44
|
|
|
abstract class TestCase extends PHPTestCase |
45
|
|
|
{ |
46
|
|
|
/** |
47
|
|
|
* Contains an instance of the class to test. |
48
|
|
|
*/ |
49
|
|
|
protected $fixture; |
50
|
|
|
|
51
|
|
|
protected $rootDir; |
52
|
|
|
|
53
|
|
|
protected function setUp(): void |
54
|
|
|
{ |
55
|
|
|
parent::setUp(); |
56
|
|
|
|
57
|
|
|
$this->rootDir = __DIR__.'/../..'; |
58
|
|
|
} |
59
|
|
|
|
60
|
|
|
protected function getDocumentInstance(): Document |
61
|
|
|
{ |
62
|
|
|
return new Document(); |
63
|
|
|
} |
64
|
|
|
|
65
|
|
|
protected function getElementInstance($value): Element |
66
|
|
|
{ |
67
|
|
|
return new Element($value); |
68
|
|
|
} |
69
|
|
|
|
70
|
|
|
protected function getParserInstance(?Config $config = null): Parser |
71
|
|
|
{ |
72
|
|
|
return new Parser([], $config); |
73
|
|
|
} |
74
|
|
|
} |
75
|
|
|
|
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