Issues (3)

tests/PDFFileTest.php (2 issues)

Labels
Severity
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
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
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
}