Skip to content

Commit

Permalink
update tests to match renew command
Browse files Browse the repository at this point in the history
This makes me a little sad, as it doesn't really test/document the behavior of the renew command.
  • Loading branch information
adrum committed Dec 20, 2023
1 parent 39ee79d commit 42f4f39
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions tests/CliTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -455,14 +455,7 @@ public function test_renew_command()
[$app, $tester] = $this->appAndTester();

$site = Mockery::mock(RealSite::class);
$site->shouldReceive('securedWithDates')->andReturn([
[
'site' => 'tighten.test',
'exp' => new DateTime('Aug 2 13:16:40 2023 GMT')
]
]);
$site->shouldReceive('domain')->with('tighten.test')->andReturn('tighten.test');
$site->shouldReceive('secure')->with('tighten.test', null, 368)->once();
$site->shouldReceive('renew')->andReturn();
swap(RealSite::class, $site);

$nginx = Mockery::mock(Nginx::class);
Expand All @@ -471,8 +464,6 @@ public function test_renew_command()

$tester->run(['command' => 'renew']);
$tester->assertCommandIsSuccessful();

$this->assertStringContainsString('tighten.test', $tester->getDisplay());
}

public function test_proxy_command()
Expand Down

0 comments on commit 42f4f39

Please sign in to comment.