mirror of
https://github.com/laravel/valet.git
synced 2026-02-04 16:10:08 +01:00
@@ -477,7 +477,9 @@ public function replaceOldLoopbackWithNew($siteConf, $old, $new)
|
||||
public function secured()
|
||||
{
|
||||
return collect($this->files->scandir($this->certificatesPath()))
|
||||
->map(function ($file) {
|
||||
->filter(function ($file) {
|
||||
return ends_with($file, ['.key', '.csr', '.crt', '.conf']);
|
||||
})->map(function ($file) {
|
||||
return str_replace(['.key', '.csr', '.crt', '.conf'], '', $file);
|
||||
})->unique()->values()->all();
|
||||
}
|
||||
|
||||
@@ -787,7 +787,7 @@ public function test_it_returns_secured_sites()
|
||||
$files = Mockery::mock(Filesystem::class);
|
||||
$files->shouldReceive('scandir')
|
||||
->once()
|
||||
->andReturn(['helloworld.tld.crt']);
|
||||
->andReturn(['helloworld.tld.crt', '.DS_Store']);
|
||||
|
||||
swap(Filesystem::class, $files);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user