mirror of
https://github.com/laravel/valet.git
synced 2026-02-04 16:10:08 +01:00
Add command to list isolated sites
This commit is contained in:
@@ -64,6 +64,7 @@ public function test_utilized_php_versions()
|
||||
{
|
||||
$fileSystemMock = Mockery::mock(Filesystem::class);
|
||||
$brewMock = Mockery::mock(Brew::class);
|
||||
$nginxMock = Mockery::mock(Nginx::class);
|
||||
|
||||
$phpFpmMock = Mockery::mock(PhpFpm::class, [
|
||||
$brewMock,
|
||||
@@ -71,7 +72,7 @@ public function test_utilized_php_versions()
|
||||
$fileSystemMock,
|
||||
resolve(Configuration::class),
|
||||
Mockery::mock(Site::class),
|
||||
Mockery::mock(Nginx::class),
|
||||
$nginxMock,
|
||||
])->makePartial();
|
||||
|
||||
swap(PhpFpm::class, $phpFpmMock);
|
||||
@@ -85,12 +86,9 @@ public function test_utilized_php_versions()
|
||||
|
||||
$brewMock->shouldReceive('getLinkedPhpFormula')->andReturn('php@7.3');
|
||||
|
||||
$fileSystemMock->shouldReceive('scandir')
|
||||
$nginxMock->shouldReceive('configuredSites')
|
||||
->once()
|
||||
->with(VALET_HOME_PATH.'/Nginx')
|
||||
->andReturn(['.gitkeep', 'isolated-site-71.test', 'isolated-site-72.test', 'isolated-site-73.test']);
|
||||
|
||||
$fileSystemMock->shouldNotReceive('get')->with(VALET_HOME_PATH.'/Nginx/.gitkeep');
|
||||
->andReturn(collect(['isolated-site-71.test', 'isolated-site-72.test', 'isolated-site-73.test']));
|
||||
|
||||
$sites = [
|
||||
[
|
||||
@@ -114,6 +112,11 @@ public function test_utilized_php_versions()
|
||||
$this->assertEquals(['php@7.1', 'php@7.2', 'php@7.3'], resolve(PhpFpm::class)->utilizedPhpVersions());
|
||||
}
|
||||
|
||||
public function test_it_lists_isolated_directories()
|
||||
{
|
||||
$this->markTestIncomplete('@todo');
|
||||
}
|
||||
|
||||
public function test_stop_unused_php_versions()
|
||||
{
|
||||
$brewMock = Mockery::mock(Brew::class);
|
||||
|
||||
Reference in New Issue
Block a user