Files
pest/src/Plugins/Tia/WatchDefaults/Laravel.php
nuno maduro d6db3a8a20 wip
2026-05-02 18:32:05 +01:00

41 lines
982 B
PHP

<?php
declare(strict_types=1);
namespace Pest\Plugins\Tia\WatchDefaults;
use Composer\InstalledVersions;
/**
* @internal
*/
final readonly class Laravel implements WatchDefault
{
public function applicable(): bool
{
return class_exists(InstalledVersions::class)
&& InstalledVersions::isInstalled('laravel/framework');
}
public function defaults(string $projectRoot, string $testPath): array
{
return [
'database/migrations/**/*.php' => [$testPath],
'storage/fixtures/**/*' => [$testPath],
'app/** !*.php' => [$testPath],
'resources/views/**' => [$testPath],
'lang/**' => [$testPath],
'resources/lang/**' => [$testPath],
'vite.config.* !*.php' => [$testPath],
'webpack.mix.* !*.php' => [$testPath],
'tailwind.config.* !*.php' => [$testPath],
'postcss.config.* !*.php' => [$testPath],
];
}
}