diff --git a/tests/Unit/Deployment/WebProcessOwnershipTest.php b/tests/Unit/Deployment/WebProcessOwnershipTest.php index 6d44d0ab..12130d05 100644 --- a/tests/Unit/Deployment/WebProcessOwnershipTest.php +++ b/tests/Unit/Deployment/WebProcessOwnershipTest.php @@ -62,14 +62,17 @@ class WebProcessOwnershipTest extends TestCase $this->assertStringContainsString('run_artisan_as_web view:cache', $entrypoint); } - public function test_local_php_and_view_caches_are_disabled(): void + public function test_local_php_cache_follows_bind_mounted_source(): void { $php = file_get_contents(base_path('deploy/php-local.ini')); $view = file_get_contents(base_path('config/view.php')); $this->assertIsString($php); - $this->assertStringContainsString('opcache.enable=0', $php); + // OPcache 开启以加速本地预览,但每次请求校验时间戳:源码一改、下次请求立即生效。 + $this->assertStringContainsString('opcache.enable=1', $php); $this->assertStringContainsString('opcache.enable_cli=0', $php); + $this->assertStringContainsString('opcache.validate_timestamps=1', $php); + $this->assertStringContainsString('opcache.revalidate_freq=0', $php); $this->assertStringContainsString("'cache' => env('APP_ENV', 'production') === 'local'", $view); $this->assertStringContainsString("? false", $view); }