mirror of
https://github.com/laravel/valet.git
synced 2026-02-06 00:40:06 +01:00
Add mocks to get tld
This commit is contained in:
@@ -314,6 +314,12 @@ public function test_no_proxies()
|
||||
|
||||
public function test_lists_proxies()
|
||||
{
|
||||
$config = Mockery::mock(Configuration::class);
|
||||
$config->shouldReceive('read')
|
||||
->andReturn(['tld' => 'test']);
|
||||
|
||||
swap(Configuration::class, $config);
|
||||
|
||||
/** @var FixturesSiteFake $site */
|
||||
$site = resolve(FixturesSiteFake::class);
|
||||
|
||||
@@ -338,6 +344,12 @@ public function test_lists_proxies()
|
||||
|
||||
public function test_add_proxy()
|
||||
{
|
||||
$config = Mockery::mock(Configuration::class);
|
||||
$config->shouldReceive('read')
|
||||
->andReturn(['tld' => 'test']);
|
||||
|
||||
swap(Configuration::class, $config);
|
||||
|
||||
swap(CommandLine::class, resolve(CommandLineFake::class));
|
||||
|
||||
/** @var FixturesSiteFake $site */
|
||||
@@ -366,6 +378,12 @@ public function test_add_proxy()
|
||||
|
||||
public function test_add_proxy_clears_previous_proxy_certificate()
|
||||
{
|
||||
$config = Mockery::mock(Configuration::class);
|
||||
$config->shouldReceive('read')
|
||||
->andReturn(['tld' => 'test']);
|
||||
|
||||
swap(Configuration::class, $config);
|
||||
|
||||
swap(CommandLine::class, resolve(CommandLineFake::class));
|
||||
|
||||
/** @var FixturesSiteFake $site */
|
||||
@@ -405,6 +423,12 @@ public function test_add_proxy_clears_previous_proxy_certificate()
|
||||
|
||||
public function test_add_proxy_clears_previous_non_proxy_certificate()
|
||||
{
|
||||
$config = Mockery::mock(Configuration::class);
|
||||
$config->shouldReceive('read')
|
||||
->andReturn(['tld' => 'test']);
|
||||
|
||||
swap(Configuration::class, $config);
|
||||
|
||||
swap(CommandLine::class, resolve(CommandLineFake::class));
|
||||
|
||||
/** @var FixturesSiteFake $site */
|
||||
@@ -440,6 +464,12 @@ public function test_add_proxy_clears_previous_non_proxy_certificate()
|
||||
|
||||
public function test_remove_proxy()
|
||||
{
|
||||
$config = Mockery::mock(Configuration::class);
|
||||
$config->shouldReceive('read')
|
||||
->andReturn(['tld' => 'test']);
|
||||
|
||||
swap(Configuration::class, $config);
|
||||
|
||||
swap(CommandLine::class, resolve(CommandLineFake::class));
|
||||
|
||||
/** @var FixturesSiteFake $site */
|
||||
|
||||
Reference in New Issue
Block a user