Skip to content

Commit

Permalink
Use a real .zip file in the test as that's the file type the class is…
Browse files Browse the repository at this point in the history
… using the most often

The PHP source code started to be detected as application/javascript on PHP 8.4 either because bundled libmagic has been updated, or because the setup-php action uses its own or something.
  • Loading branch information
spaze committed Nov 23, 2024
1 parent aa81698 commit 09b75cf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/tests/Training/Files/TrainingFilesDownloadTest.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ class TrainingFilesDownloadTest extends TestCase
$sessionSection = $this->session->getSection('training');
$sessionSection->set('applicationId', self::APPLICATION_ID);
$sessionSection->set('token', self::TOKEN);
$filename = basename(__FILE__);
$filename = 'file.zip';
$filesDir = __DIR__ . '/';
$this->database->setFetchResult([
'added' => new DateTime(),
Expand All @@ -125,7 +125,7 @@ class TrainingFilesDownloadTest extends TestCase
$response = $this->trainingFilesDownload->getFileResponse('foo');
Assert::same($filesDir . $filename, $response->getFile());
Assert::same($filename, $response->getName());
Assert::same('text/x-php', $response->getContentType());
Assert::same('application/zip', $response->getContentType());
}


Expand Down
Binary file added app/tests/Training/Files/file.zip
Binary file not shown.

0 comments on commit 09b75cf

Please sign in to comment.