1 | <?php |
||||
2 | |||||
3 | declare(strict_types=1); |
||||
4 | |||||
5 | namespace Hyde\Testing; |
||||
6 | |||||
7 | use Hyde\Hyde; |
||||
8 | |||||
9 | class DefaultContentTest extends UnitTestCase |
||||
0 ignored issues
–
show
|
|||||
10 | { |
||||
11 | public static function setUpBeforeClass(): void |
||||
12 | { |
||||
13 | self::resetKernel(); |
||||
14 | } |
||||
15 | |||||
16 | public function testDefaultPagesArePresent() |
||||
17 | { |
||||
18 | $this->assertFileExists(Hyde::path('_pages/index.blade.php')); |
||||
0 ignored issues
–
show
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
![]() |
|||||
19 | $this->assertFileExists(Hyde::path('_pages/404.blade.php')); |
||||
20 | |||||
21 | $this->assertStringContainsString( |
||||
22 | '<title>Welcome to HydePHP!</title>', |
||||
23 | file_get_contents(Hyde::path('_pages/index.blade.php')) |
||||
24 | ); |
||||
25 | |||||
26 | $this->assertStringContainsString( |
||||
27 | '<title>404 - Page not found</title>', |
||||
28 | file_get_contents(Hyde::path('_pages/404.blade.php')) |
||||
29 | ); |
||||
30 | } |
||||
31 | |||||
32 | public function testDefaultCompiledStylesheetIsPresent() |
||||
33 | { |
||||
34 | $this->assertFileExists(Hyde::path('_media/app.css')); |
||||
35 | |||||
36 | $contents = file_get_contents(Hyde::path('_media/app.css')); |
||||
37 | |||||
38 | $this->assertStringContainsString('--tw-', $contents); |
||||
39 | $this->assertStringContainsString('--tw-prose-', $contents); |
||||
40 | } |
||||
41 | |||||
42 | public function testLaravelMixResourcesArePresent() |
||||
43 | { |
||||
44 | $this->assertFileExists(Hyde::path('resources/assets/app.css')); |
||||
45 | $this->assertFileExists(Hyde::path('resources/assets/app.js')); |
||||
46 | |||||
47 | $this->assertFileContainsString("@import 'tailwindcss'", Hyde::path('resources/assets/app.css')); |
||||
48 | $this->assertFileContainsString('This is the main JavaScript', Hyde::path('resources/assets/app.js')); |
||||
49 | } |
||||
50 | |||||
51 | protected function assertFileContainsString(string $string, string $file) |
||||
52 | { |
||||
53 | $this->assertStringContainsString($string, file_get_contents($file)); |
||||
54 | } |
||||
55 | } |
||||
56 |
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