mirror of
https://github.com/laravel/valet.git
synced 2026-02-05 00:20:08 +01:00
Fix tests to prepend 'disable auto cleanup' env var
This commit is contained in:
@@ -102,9 +102,10 @@ public function test_has_installed_php_indicates_if_php_is_installed_via_brew()
|
||||
public function test_tap_taps_the_given_homebrew_repository()
|
||||
{
|
||||
$cli = Mockery::mock(CommandLine::class);
|
||||
$cli->shouldReceive('passthru')->once()->with('sudo -u "'.user().'" brew tap php@8.0');
|
||||
$cli->shouldReceive('passthru')->once()->with('sudo -u "'.user().'" brew tap php@7.1');
|
||||
$cli->shouldReceive('passthru')->once()->with('sudo -u "'.user().'" brew tap php@7.0');
|
||||
$prefix = Brew::BREW_DISABLE_AUTO_CLEANUP;
|
||||
$cli->shouldReceive('passthru')->once()->with($prefix.' sudo -u "'.user().'" brew tap php@8.0');
|
||||
$cli->shouldReceive('passthru')->once()->with($prefix.' sudo -u "'.user().'" brew tap php@7.1');
|
||||
$cli->shouldReceive('passthru')->once()->with($prefix.' sudo -u "'.user().'" brew tap php@7.0');
|
||||
swap(CommandLine::class, $cli);
|
||||
resolve(Brew::class)->tap('php@8.0', 'php@7.1', 'php@7.0');
|
||||
}
|
||||
@@ -197,7 +198,7 @@ public function test_linked_php_throws_exception_if_unsupported_php_version_is_l
|
||||
public function test_install_or_fail_will_install_brew_formulae()
|
||||
{
|
||||
$cli = Mockery::mock(CommandLine::class);
|
||||
$cli->shouldReceive('runAsUser')->once()->with('brew install dnsmasq', Mockery::type('Closure'));
|
||||
$cli->shouldReceive('runAsUser')->once()->with(Brew::BREW_DISABLE_AUTO_CLEANUP.' brew install dnsmasq', Mockery::type('Closure'));
|
||||
swap(CommandLine::class, $cli);
|
||||
resolve(Brew::class)->installOrFail('dnsmasq');
|
||||
}
|
||||
@@ -205,7 +206,7 @@ public function test_install_or_fail_will_install_brew_formulae()
|
||||
public function test_install_or_fail_can_install_taps()
|
||||
{
|
||||
$cli = Mockery::mock(CommandLine::class);
|
||||
$cli->shouldReceive('runAsUser')->once()->with('brew install dnsmasq', Mockery::type('Closure'));
|
||||
$cli->shouldReceive('runAsUser')->once()->with(Brew::BREW_DISABLE_AUTO_CLEANUP.' brew install dnsmasq', Mockery::type('Closure'));
|
||||
swap(CommandLine::class, $cli);
|
||||
$brew = Mockery::mock(Brew::class.'[tap]', [$cli, new Filesystem]);
|
||||
$brew->shouldReceive('tap')->once()->with(['test/tap']);
|
||||
|
||||
Reference in New Issue
Block a user