This commit is contained in:
2026-04-18 14:18:52 +02:00
parent 5b4d3d435e
commit f3e5100d5d
126 changed files with 743 additions and 795 deletions

View File

@@ -2,15 +2,15 @@
namespace Tests\Feature;
use Tests\TestCase;
use App\Services\GalleryService;
use App\Models\Hentai;
use App\Models\Episode;
use App\Models\Gallery;
use App\Models\Hentai;
use App\Models\Studios;
use App\Services\GalleryService;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Illuminate\Http\UploadedFile;
use Illuminate\Support\Facades\Storage;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Tests\TestCase;
class GalleryServiceTest extends TestCase
{
@@ -21,7 +21,7 @@ class GalleryServiceTest extends TestCase
protected function setUp(): void
{
parent::setUp();
$this->galleryService = new GalleryService();
$this->galleryService = new GalleryService;
}
public function test_create_or_update_gallery()
@@ -38,7 +38,7 @@ class GalleryServiceTest extends TestCase
$file = UploadedFile::fake()->image('test_image.jpg');
// Create a request with the fake file
$request = new \Illuminate\Http\Request();
$request = new \Illuminate\Http\Request;
$request->files->add(['episodegallery1' => [$file]]);
// Call the method to test
@@ -51,7 +51,7 @@ class GalleryServiceTest extends TestCase
$this->assertDatabaseHas('gallery', [
'hentai_id' => $hentai->id,
'episode_id' => $episode->id,
'image_url' => $imageURL,
'image_url' => $imageURL,
'thumbnail_url' => $thumbnailURL,
]);
@@ -59,4 +59,4 @@ class GalleryServiceTest extends TestCase
$this->assertTrue(Storage::disk('public')->exists($imageURL));
$this->assertTrue(Storage::disk('public')->exists($thumbnailURL));
}
}
}