diff --git a/tests/backend/Modules/Dictionary/Infrastructure/Import/ArchiveExtractorTest.php b/tests/backend/Modules/Dictionary/Infrastructure/Import/ArchiveExtractorTest.php index 75c79c50d..92a6edaef 100644 --- a/tests/backend/Modules/Dictionary/Infrastructure/Import/ArchiveExtractorTest.php +++ b/tests/backend/Modules/Dictionary/Infrastructure/Import/ArchiveExtractorTest.php @@ -15,13 +15,16 @@ namespace Lwt\Tests\Modules\Dictionary\Infrastructure\Import; use Lwt\Modules\Dictionary\Infrastructure\Import\ArchiveExtractor; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use RuntimeException; use ZipArchive; /** - * @covers \Lwt\Modules\Dictionary\Infrastructure\Import\ArchiveExtractor + * Archive detection, extraction and cleanup, including the path-traversal + * guard and the nested-file search extraction relies on. */ +#[CoversClass(ArchiveExtractor::class)] class ArchiveExtractorTest extends TestCase { private string $sandbox; diff --git a/tests/backend/Modules/Dictionary/Infrastructure/Import/CsvImporterBomTest.php b/tests/backend/Modules/Dictionary/Infrastructure/Import/CsvImporterBomTest.php index b0580a1c0..2b209ade9 100644 --- a/tests/backend/Modules/Dictionary/Infrastructure/Import/CsvImporterBomTest.php +++ b/tests/backend/Modules/Dictionary/Infrastructure/Import/CsvImporterBomTest.php @@ -15,12 +15,15 @@ namespace Lwt\Tests\Modules\Dictionary\Infrastructure\Import; use Lwt\Modules\Dictionary\Infrastructure\Import\CsvImporter; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use RuntimeException; /** - * @covers \Lwt\Modules\Dictionary\Infrastructure\Import\CsvImporter + * What the importer does with a byte-order mark: UTF-8 is stripped from the + * first cell, UTF-16 and UTF-32 are refused with a message that says why. */ +#[CoversClass(CsvImporter::class)] class CsvImporterBomTest extends TestCase { private string $tmpDir; diff --git a/tests/backend/Modules/Dictionary/Infrastructure/Import/CsvImporterCanImportTest.php b/tests/backend/Modules/Dictionary/Infrastructure/Import/CsvImporterCanImportTest.php index 02599189f..29aaa48bd 100644 --- a/tests/backend/Modules/Dictionary/Infrastructure/Import/CsvImporterCanImportTest.php +++ b/tests/backend/Modules/Dictionary/Infrastructure/Import/CsvImporterCanImportTest.php @@ -16,11 +16,14 @@ namespace Lwt\Tests\Modules\Dictionary\Infrastructure\Import; use Lwt\Modules\Dictionary\Infrastructure\Import\CsvImporter; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; /** - * @covers \Lwt\Modules\Dictionary\Infrastructure\Import\CsvImporter + * Whether a file is a CSV when the upload path has no extension, which is + * how PHP hands over $_FILES['file']['tmp_name']. */ +#[CoversClass(CsvImporter::class)] class CsvImporterCanImportTest extends TestCase { private string $tmpDir; diff --git a/tests/backend/Modules/Dictionary/Infrastructure/Import/JsonImporterCanImportTest.php b/tests/backend/Modules/Dictionary/Infrastructure/Import/JsonImporterCanImportTest.php index a52031f31..8d6d5588e 100644 --- a/tests/backend/Modules/Dictionary/Infrastructure/Import/JsonImporterCanImportTest.php +++ b/tests/backend/Modules/Dictionary/Infrastructure/Import/JsonImporterCanImportTest.php @@ -16,11 +16,14 @@ namespace Lwt\Tests\Modules\Dictionary\Infrastructure\Import; use Lwt\Modules\Dictionary\Infrastructure\Import\JsonImporter; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; /** - * @covers \Lwt\Modules\Dictionary\Infrastructure\Import\JsonImporter + * Whether a file is JSON when the upload path has no extension, which is + * how PHP hands over $_FILES['file']['tmp_name']. */ +#[CoversClass(JsonImporter::class)] class JsonImporterCanImportTest extends TestCase { private string $tmpDir;