mirror of
https://github.com/laravel/valet.git
synced 2026-02-06 00:40:06 +01:00
Drop PHP 5.6; extract site-specific PHP version isolation to its own commands
This commit is contained in:
@@ -630,12 +630,12 @@ public function test_isolation_will_persist_when_removing_ssl_certificate()
|
||||
|
||||
// If a site has an isolated PHP version, there should still be a custom nginx site config
|
||||
$siteMock->shouldReceive('customPhpVersion')->with('site1.test')->andReturn('73')->once();
|
||||
$siteMock->shouldReceive('installSiteConfig')->withArgs(['site1.test', 'valet73.sock', '73'])->once();
|
||||
$siteMock->shouldReceive('isolate')->withArgs(['site1.test', 'valet73.sock', '73'])->once();
|
||||
resolve(Site::class)->unsecure('site1.test');
|
||||
|
||||
// If a site doesn't have an isolated PHP version, there should no longer be a custom nginx site config
|
||||
$siteMock->shouldReceive('customPhpVersion')->with('site2.test')->andReturn(null)->once();
|
||||
$siteMock->shouldNotReceive('installSiteConfig');
|
||||
$siteMock->shouldNotReceive('isolate');
|
||||
resolve(Site::class)->unsecure('site2.test');
|
||||
}
|
||||
|
||||
@@ -668,7 +668,7 @@ public function test_can_install_nginx_site_config_for_specific_php_version()
|
||||
'# Valet isolated PHP version : php@8.0'.PHP_EOL.'server { fastcgi_pass: valet80.sock }',
|
||||
]);
|
||||
|
||||
$siteMock->installSiteConfig('site1.test', 'valet80.sock', 'php@8.0');
|
||||
$siteMock->isolate('site1.test', 'valet80.sock', 'php@8.0');
|
||||
|
||||
// When no Nginx file exists, it will create a new config file from the template
|
||||
$files->shouldReceive('exists')->once()->with($siteMock->nginxPath('site2.test'))->andReturn(false);
|
||||
@@ -688,7 +688,7 @@ public function test_can_install_nginx_site_config_for_specific_php_version()
|
||||
}),
|
||||
]);
|
||||
|
||||
$siteMock->installSiteConfig('site2.test', 'valet80.sock', 'php@8.0');
|
||||
$siteMock->isolate('site2.test', 'valet80.sock', 'php@8.0');
|
||||
}
|
||||
|
||||
public function test_it_removes_isolation()
|
||||
|
||||
Reference in New Issue
Block a user