increase test coverage (#117)

70% test coverage
remove socialite
This commit is contained in:
Saeed Vaziry
2024-03-15 22:23:45 +01:00
committed by GitHub
parent 4f12de9586
commit a406491160
62 changed files with 1102 additions and 639 deletions

View File

@ -135,4 +135,32 @@ public function test_extension_already_installed(): void
'extension' => 'gmp',
]))->assertSessionHasErrors();
}
public function test_get_php_ini(): void
{
SSH::fake('[PHP ini]');
$this->actingAs($this->user);
$this->get(route('servers.php.get-ini', [
'server' => $this->server,
'version' => '8.2',
]))->assertSessionHas('ini');
}
public function test_update_php_ini(): void
{
SSH::fake();
$this->actingAs($this->user);
$this->post(route('servers.php.update-ini', [
'server' => $this->server,
'version' => '8.2',
'ini' => 'new ini',
]))
->assertSessionDoesntHaveErrors()
->assertSessionHas('toast.type', 'success')
->assertSessionHas('toast.message', 'PHP ini updated!');
}
}