Passed
Push — master ( 54c793...ee66e8 )
by Lluís
05:11 queued 10s
created

PDFFileCannotBeCreatedFromInvalidPath()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
namespace tests;
3
4
require '../vendor/autoload.php';
5
require '../src/create_documentation/PDFFile.php';
6
7
use Mpdf\MpdfException;
8
use PHPUnit\Framework\TestCase;
0 ignored issues
show
Bug introduced by
The type PHPUnit\Framework\TestCase was not found. Maybe you did not declare it correctly or list all dependencies?

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:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
9
use create_documentation\PDFFile;
10
11
class PDFFileTest extends TestCase
12
{
13
14
    /**
15
     * @test
16
     */
17
    public function PDFFileCannotBeCreatedFromInvalidPath(): void {
18
        $this->expectException(MpdfException::class);
19
        PDFFile::fromString('invalid-path');
0 ignored issues
show
Bug introduced by
The method fromString() does not exist on create_documentation\PDFFile. Since you implemented __callStatic, consider adding a @method annotation. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

19
        PDFFile::/** @scrutinizer ignore-call */ 
20
                 fromString('invalid-path');
Loading history...
20
    }
21
}