Passed
Push — master ( 5cb097...45deef )
by Caen
03:43 queued 14s
created

StaticSiteBuilderTest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 6
c 0
b 0
f 0
dl 0
loc 11
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A testCanBuildStaticSite() 0 9 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Hyde\Testing;
6
7
use Hyde\Hyde;
8
use Illuminate\Support\Facades\File;
9
10
class StaticSiteBuilderTest extends TestCase
0 ignored issues
show
Bug introduced by
The type Hyde\Testing\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...
11
{
12
    public function testCanBuildStaticSite()
13
    {
14
        File::cleanDirectory(Hyde::path('_site'));
0 ignored issues
show
Bug introduced by
The method path() does not exist on Hyde\Hyde. 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

14
        File::cleanDirectory(Hyde::/** @scrutinizer ignore-call */ path('_site'));
Loading history...
15
16
        $this->artisan('build')
17
            ->expectsOutputToContain('Building your static site!')
18
            ->assertExitCode(0);
19
20
        File::cleanDirectory(Hyde::path('_site'));
21
    }
22
}
23