Skip to content

Commit ed64ab9

Browse files
committed
add cover class in tests
1 parent dc9c109 commit ed64ab9

22 files changed

+45
-24
lines changed

tests/Unit/Cryptography/Cipher/CreateCipherKeyFailedTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,10 @@
55
namespace Patchlevel\Hydrator\Tests\Unit\Cryptography\Cipher;
66

77
use Patchlevel\Hydrator\Cryptography\Cipher\CreateCipherKeyFailed;
8+
use PHPUnit\Framework\Attributes\CoversClass;
89
use PHPUnit\Framework\TestCase;
910

10-
/** @covers \Patchlevel\Hydrator\Cryptography\Cipher\CreateCipherKeyFailed */
11+
#[CoversClass(CreateCipherKeyFailed::class)]
1112
final class CreateCipherKeyFailedTest extends TestCase
1213
{
1314
public function testCreation(): void

tests/Unit/Cryptography/Cipher/DecryptionFailedTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,10 @@
55
namespace Patchlevel\Hydrator\Tests\Unit\Cryptography\Cipher;
66

77
use Patchlevel\Hydrator\Cryptography\Cipher\DecryptionFailed;
8+
use PHPUnit\Framework\Attributes\CoversClass;
89
use PHPUnit\Framework\TestCase;
910

10-
/** @covers \Patchlevel\Hydrator\Cryptography\Cipher\DecryptionFailed */
11+
#[CoversClass(DecryptionFailed::class)]
1112
final class DecryptionFailedTest extends TestCase
1213
{
1314
public function testCreation(): void

tests/Unit/Cryptography/Cipher/EncryptionFailedTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,10 @@
55
namespace Patchlevel\Hydrator\Tests\Unit\Cryptography\Cipher;
66

77
use Patchlevel\Hydrator\Cryptography\Cipher\EncryptionFailed;
8+
use PHPUnit\Framework\Attributes\CoversClass;
89
use PHPUnit\Framework\TestCase;
910

10-
/** @covers \Patchlevel\Hydrator\Cryptography\Cipher\EncryptionFailed */
11+
#[CoversClass(EncryptionFailed::class)]
1112
final class EncryptionFailedTest extends TestCase
1213
{
1314
public function testCreation(): void

tests/Unit/Cryptography/Cipher/OpensslCipherKeyFactoryTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,12 @@
66

77
use Patchlevel\Hydrator\Cryptography\Cipher\MethodNotSupported;
88
use Patchlevel\Hydrator\Cryptography\Cipher\OpensslCipherKeyFactory;
9+
use PHPUnit\Framework\Attributes\CoversClass;
910
use PHPUnit\Framework\TestCase;
1011

1112
use function strlen;
1213

13-
/** @covers \Patchlevel\Hydrator\Cryptography\Cipher\OpensslCipherKeyFactory */
14+
#[CoversClass(OpensslCipherKeyFactory::class)]
1415
final class OpensslCipherKeyFactoryTest extends TestCase
1516
{
1617
public function testCreateKey(): void

tests/Unit/Cryptography/Cipher/OpensslCipherTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,11 @@
99
use Patchlevel\Hydrator\Cryptography\Cipher\DecryptionFailed;
1010
use Patchlevel\Hydrator\Cryptography\Cipher\EncryptionFailed;
1111
use Patchlevel\Hydrator\Cryptography\Cipher\OpensslCipher;
12+
use PHPUnit\Framework\Attributes\CoversClass;
1213
use PHPUnit\Framework\Attributes\DataProvider;
1314
use PHPUnit\Framework\TestCase;
1415

15-
/** @covers \Patchlevel\Hydrator\Cryptography\Cipher\OpensslCipher */
16+
#[CoversClass(OpensslCipher::class)]
1617
final class OpensslCipherTest extends TestCase
1718
{
1819
#[DataProvider('dataProvider')]

tests/Unit/Cryptography/MissingSubjectIdTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,10 @@
66

77
use Patchlevel\Hydrator\Cryptography\MissingSubjectId;
88
use Patchlevel\Hydrator\Tests\Unit\Fixture\ProfileCreated;
9+
use PHPUnit\Framework\Attributes\CoversClass;
910
use PHPUnit\Framework\TestCase;
1011

11-
/** @covers \Patchlevel\Hydrator\Cryptography\MissingSubjectId */
12+
#[CoversClass(MissingSubjectId::class)]
1213
final class MissingSubjectIdTest extends TestCase
1314
{
1415
public function testCreation(): void

tests/Unit/Cryptography/SensitiveDataPayloadCryptographerTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,10 @@
2222
use Patchlevel\Hydrator\Tests\Unit\Fixture\SensitiveDataProfileCreatedFallbackCallback;
2323
use Patchlevel\Hydrator\Tests\Unit\Fixture\SensitiveDataWithStringableSubjectId;
2424
use Patchlevel\Hydrator\Tests\Unit\Fixture\StringableSubjectId;
25+
use PHPUnit\Framework\Attributes\CoversClass;
2526
use PHPUnit\Framework\TestCase;
2627

27-
/** @covers \Patchlevel\Hydrator\Cryptography\SensitiveDataPayloadCryptographer */
28+
#[CoversClass(SensitiveDataPayloadCryptographer::class)]
2829
final class SensitiveDataPayloadCryptographerTest extends TestCase
2930
{
3031
public function testSkipEncrypt(): void

tests/Unit/Cryptography/Store/CipherKeyNotExistsTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,10 @@
55
namespace Patchlevel\Hydrator\Tests\Unit\Cryptography\Store;
66

77
use Patchlevel\Hydrator\Cryptography\Store\CipherKeyNotExists;
8+
use PHPUnit\Framework\Attributes\CoversClass;
89
use PHPUnit\Framework\TestCase;
910

10-
/** @covers \Patchlevel\Hydrator\Cryptography\Store\CipherKeyNotExists */
11+
#[CoversClass(CipherKeyNotExists::class)]
1112
final class CipherKeyNotExistsTest extends TestCase
1213
{
1314
public function testCreation(): void

tests/Unit/Cryptography/Store/InMemoryCipherKeyStoreTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,10 @@
77
use Patchlevel\Hydrator\Cryptography\Cipher\CipherKey;
88
use Patchlevel\Hydrator\Cryptography\Store\CipherKeyNotExists;
99
use Patchlevel\Hydrator\Cryptography\Store\InMemoryCipherKeyStore;
10+
use PHPUnit\Framework\Attributes\CoversClass;
1011
use PHPUnit\Framework\TestCase;
1112

12-
/** @covers \Patchlevel\Hydrator\Cryptography\Store\InMemoryCipherKeyStore */
13+
#[CoversClass(InMemoryCipherKeyStore::class)]
1314
final class InMemoryCipherKeyStoreTest extends TestCase
1415
{
1516
public function testStoreAndLoad(): void

tests/Unit/Cryptography/UnsupportedSubjectIdTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,10 @@
55
namespace Patchlevel\Hydrator\Tests\Unit\Cryptography;
66

77
use Patchlevel\Hydrator\Cryptography\UnsupportedSubjectId;
8+
use PHPUnit\Framework\Attributes\CoversClass;
89
use PHPUnit\Framework\TestCase;
910

10-
/** @covers \Patchlevel\Hydrator\Cryptography\UnsupportedSubjectId */
11+
#[CoversClass(UnsupportedSubjectId::class)]
1112
final class UnsupportedSubjectIdTest extends TestCase
1213
{
1314
public function testCreation(): void

0 commit comments

Comments
 (0)