feat: ajout de claude + correction des tests
All checks were successful
Build and Deploy / deploy (push) Successful in 9m36s
All checks were successful
Build and Deploy / deploy (push) Successful in 9m36s
This commit is contained in:
parent
b5a832fbbc
commit
dae215dd3d
@@ -21,7 +21,8 @@ class ImportChapterTest extends WebTestCase
|
||||
'mangaId' => 'non-existent-manga-id',
|
||||
'chapterNumber' => '1.5'
|
||||
],
|
||||
['file' => $file]
|
||||
['file' => $file],
|
||||
['CONTENT_TYPE' => 'multipart/form-data']
|
||||
);
|
||||
|
||||
$this->assertResponseStatusCodeSame(404);
|
||||
@@ -40,7 +41,8 @@ class ImportChapterTest extends WebTestCase
|
||||
[
|
||||
'chapterNumber' => '1.5'
|
||||
],
|
||||
['file' => $file]
|
||||
['file' => $file],
|
||||
['CONTENT_TYPE' => 'multipart/form-data']
|
||||
);
|
||||
|
||||
$this->assertResponseStatusCodeSame(422);
|
||||
@@ -59,7 +61,8 @@ class ImportChapterTest extends WebTestCase
|
||||
[
|
||||
'mangaId' => 'some-manga-id'
|
||||
],
|
||||
['file' => $file]
|
||||
['file' => $file],
|
||||
['CONTENT_TYPE' => 'multipart/form-data']
|
||||
);
|
||||
|
||||
$this->assertResponseStatusCodeSame(422);
|
||||
@@ -77,7 +80,9 @@ class ImportChapterTest extends WebTestCase
|
||||
[
|
||||
'mangaId' => 'some-manga-id',
|
||||
'chapterNumber' => '1.5'
|
||||
]
|
||||
],
|
||||
[],
|
||||
['CONTENT_TYPE' => 'multipart/form-data']
|
||||
);
|
||||
|
||||
$this->assertResponseStatusCodeSame(422);
|
||||
@@ -89,10 +94,9 @@ class ImportChapterTest extends WebTestCase
|
||||
{
|
||||
$client = static::createClient();
|
||||
|
||||
// Create a non-CBZ file
|
||||
$tempFile = tempnam(sys_get_temp_dir(), 'test_');
|
||||
file_put_contents($tempFile, 'This is not a CBZ file');
|
||||
$file = new UploadedFile($tempFile, 'test.txt', 'text/plain');
|
||||
$file = new UploadedFile($tempFile, 'test.txt', 'text/plain', null, true);
|
||||
|
||||
$client->request(
|
||||
'POST',
|
||||
@@ -101,7 +105,8 @@ class ImportChapterTest extends WebTestCase
|
||||
'mangaId' => 'some-manga-id',
|
||||
'chapterNumber' => '1.5'
|
||||
],
|
||||
['file' => $file]
|
||||
['file' => $file],
|
||||
['CONTENT_TYPE' => 'multipart/form-data']
|
||||
);
|
||||
|
||||
$this->assertResponseStatusCodeSame(422);
|
||||
@@ -122,10 +127,6 @@ class ImportChapterTest extends WebTestCase
|
||||
$zip->addFromString('image1.jpg', 'fake-image-data');
|
||||
$zip->close();
|
||||
|
||||
return new UploadedFile($tmpFile, 'test-chapter.cbz', 'application/x-cbz');
|
||||
return new UploadedFile($tmpFile, 'test-chapter.cbz', 'application/x-cbz', null, true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user