mirror of
https://github.com/vitodeploy/vito.git
synced 2025-07-02 14:36:17 +00:00
#591 - tests
This commit is contained in:
@ -13,17 +13,14 @@
|
||||
use Illuminate\Support\Facades\Bus;
|
||||
use Illuminate\Support\Facades\Http;
|
||||
use JsonException;
|
||||
use PHPUnit\Framework\Attributes\DataProvider;
|
||||
use Tests\TestCase;
|
||||
|
||||
class DatabaseBackupTest extends TestCase
|
||||
{
|
||||
use RefreshDatabase;
|
||||
|
||||
/**
|
||||
* @dataProvider data
|
||||
*
|
||||
* @throws JsonException
|
||||
*/
|
||||
#[DataProvider('data')]
|
||||
public function test_create_backup(string $db): void
|
||||
{
|
||||
SSH::fake();
|
||||
@ -156,11 +153,7 @@ public function test_update_backup(): void
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @dataProvider data
|
||||
*
|
||||
* @throws JsonException
|
||||
*/
|
||||
#[DataProvider('data')]
|
||||
public function test_delete_backup(string $db): void
|
||||
{
|
||||
$this->setupDatabase($db);
|
||||
@ -190,11 +183,7 @@ public function test_delete_backup(string $db): void
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @dataProvider data
|
||||
*
|
||||
* @throws JsonException
|
||||
*/
|
||||
#[DataProvider('data')]
|
||||
public function test_restore_backup(string $db): void
|
||||
{
|
||||
Http::fake();
|
||||
@ -247,6 +236,9 @@ private function setupDatabase(string $database): void
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<int, array<int, string>>
|
||||
*/
|
||||
public static function data(): array
|
||||
{
|
||||
return [
|
||||
|
Reference in New Issue
Block a user