This commit is contained in:
Saeed Vaziry
2025-06-04 19:04:02 +02:00
parent 35894003f5
commit f8f8d57fe2
31 changed files with 165 additions and 171 deletions

View File

@ -5,6 +5,7 @@
use App\Models\SourceControl;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Illuminate\Support\Facades\Http;
use PHPUnit\Framework\Attributes\DataProvider;
use Tests\TestCase;
class SourceControlsTest extends TestCase
@ -13,9 +14,8 @@ class SourceControlsTest extends TestCase
/**
* @param array<string, mixed> $input
*
* @dataProvider data
*/
#[DataProvider('data')]
public function test_connect_provider(string $provider, ?string $customUrl, array $input): void
{
$this->actingAs($this->user);
@ -53,9 +53,7 @@ public function test_connect_provider(string $provider, ?string $customUrl, arra
}
}
/**
* @dataProvider data
*/
#[DataProvider('data')]
public function test_delete_provider(string $provider): void
{
$this->actingAs($this->user);
@ -75,9 +73,7 @@ public function test_delete_provider(string $provider): void
]);
}
/**
* @dataProvider data
*/
#[DataProvider('data')]
public function test_cannot_delete_provider(string $provider): void
{
$this->actingAs($this->user);
@ -104,9 +100,8 @@ public function test_cannot_delete_provider(string $provider): void
/**
* @param array<string, mixed> $input
*
* @dataProvider data
*/
#[DataProvider('data')]
public function test_edit_source_control(string $provider, ?string $url, array $input): void
{
Http::fake();