mirror of
https://github.com/laravel/valet.git
synced 2026-02-08 17:20:08 +01:00
Ensure base configuration is correct even if file already exists
This commit is contained in:
@@ -132,4 +132,14 @@ public function test_trust_adds_the_sudoer_files()
|
||||
resolve(Brew::class)->createSudoersEntry();
|
||||
resolve(Valet::class)->createSudoersEntry();
|
||||
}
|
||||
|
||||
public function test_ensure_configuration_exists_writes_tld_and_loopback_if_empty()
|
||||
{
|
||||
$config = Mockery::mock(Configuration::class.'[writeBaseConfiguration,read,updateKey]', [new Filesystem]);
|
||||
$config->shouldReceive('writeBaseConfiguration')->once();
|
||||
$config->shouldReceive('read')->times(2)->andReturn([]);
|
||||
$config->shouldReceive('updateKey')->with('tld', 'test');
|
||||
$config->shouldReceive('updateKey')->with('loopback', '127.0.0.1');
|
||||
$config->ensureBaseConfiguration();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user