From 2b9d9e68b6b1725939032309282668f6960e233e Mon Sep 17 00:00:00 2001 From: Tim van Dijen Date: Tue, 19 Mar 2024 21:26:22 +0100 Subject: [PATCH] Migrate phpunit metadata to attributes --- tests/CryptoEncoding/PEMBundleTest.php | 29 ++++++++------------- tests/CryptoEncoding/PEMTest.php | 14 +++++----- tests/Utils/CertificateTest.php | 19 ++++++-------- tests/XML/CustomSignableTest.php | 3 ++- tests/XML/EncryptedCustomTest.php | 11 +++++--- tests/XML/SignableElementTest.php | 5 ++-- tests/XML/SignedElementTest.php | 8 +++--- tests/XML/ds/CanonicalizationMethodTest.php | 7 ++--- tests/XML/ds/DigestMethodTest.php | 7 ++--- tests/XML/ds/DigestValueTest.php | 7 ++--- tests/XML/ds/ExponentTest.php | 7 ++--- tests/XML/ds/KeyInfoTest.php | 7 ++--- tests/XML/ds/KeyNameTest.php | 7 ++--- tests/XML/ds/KeyValueTest.php | 7 ++--- tests/XML/ds/ManifestTest.php | 7 ++--- tests/XML/ds/ModulusTest.php | 7 ++--- tests/XML/ds/ObjectTest.php | 7 ++--- tests/XML/ds/RSAKeyValueTest.php | 7 ++--- tests/XML/ds/ReferenceTest.php | 7 ++--- tests/XML/ds/RetrievalMethodTest.php | 7 ++--- tests/XML/ds/SignatureMethodTest.php | 7 ++--- tests/XML/ds/SignaturePropertiesTest.php | 7 ++--- tests/XML/ds/SignaturePropertyTest.php | 7 ++--- tests/XML/ds/SignatureTest.php | 7 ++--- tests/XML/ds/SignatureValueTest.php | 7 ++--- tests/XML/ds/SignedInfoTest.php | 7 ++--- tests/XML/ds/TransformTest.php | 7 ++--- tests/XML/ds/TransformsTest.php | 7 ++--- tests/XML/ds/X509CertificateTest.php | 7 ++--- tests/XML/ds/X509DataTest.php | 7 ++--- tests/XML/ds/X509IssuerNameTest.php | 7 ++--- tests/XML/ds/X509IssuerSerialTest.php | 7 ++--- tests/XML/ds/X509SerialNumberTest.php | 7 ++--- tests/XML/ds/X509SubjectNameTest.php | 7 ++--- tests/XML/ds/XPathTest.php | 6 +++-- tests/XML/dsig11/KeyInfoReferenceTest.php | 7 ++--- tests/XML/dsig11/X509DigestTest.php | 7 ++--- tests/XML/ec/InclusiveNamespacesTest.php | 7 ++--- tests/XML/xenc/CarriedKeyNameTest.php | 4 +++ tests/XML/xenc/CipherDataTest.php | 4 +++ tests/XML/xenc/CipherReferenceTest.php | 6 +++++ tests/XML/xenc/CipherValueTest.php | 4 +++ tests/XML/xenc/DataReferenceTest.php | 6 +++++ tests/XML/xenc/EncryptedDataTest.php | 6 +++++ tests/XML/xenc/EncryptedKeyTest.php | 6 +++++ tests/XML/xenc/EncryptionMethodTest.php | 6 +++++ tests/XML/xenc/EncryptionPropertiesTest.php | 6 +++++ tests/XML/xenc/EncryptionPropertyTest.php | 6 +++++ tests/XML/xenc/KeyReferenceTest.php | 6 +++++ tests/XML/xenc/KeySizeTest.php | 4 +++ tests/XML/xenc/OAEPparamsTest.php | 4 +++ tests/XML/xenc/ReferenceListTest.php | 4 +++ tests/XML/xenc/TransformsTest.php | 4 +++ 53 files changed, 242 insertions(+), 139 deletions(-) diff --git a/tests/CryptoEncoding/PEMBundleTest.php b/tests/CryptoEncoding/PEMBundleTest.php index d57ed5c0..32ae1f78 100644 --- a/tests/CryptoEncoding/PEMBundleTest.php +++ b/tests/CryptoEncoding/PEMBundleTest.php @@ -5,6 +5,8 @@ namespace SimpleSAML\XMLSecurity\Test\CryptoEncoding; use LogicException; +use PHPUnit\Framework\Attributes\Depends; +use PHPUnit\Framework\Attributes\Group; use PHPUnit\Framework\TestCase; use SimpleSAML\XMLSecurity\CryptoEncoding\PEM; use SimpleSAML\XMLSecurity\CryptoEncoding\PEMBundle; @@ -14,10 +16,9 @@ use function dirname; /** - * @group pem - * * @internal */ +#[Group('pem')] class PEMBundleTest extends TestCase { private static string $baseDir; @@ -43,10 +44,9 @@ public function testBundle(): PEMBundle /** - * @depends testBundle - * * @param \SimpleSAML\XMLSecurity\CryptoEncoding\PEMBundle $bundle */ + #[Depends('testBundle')] public function testAll(PEMBundle $bundle): void { $this->assertContainsOnlyInstancesOf(PEM::class, $bundle->all()); @@ -54,10 +54,9 @@ public function testAll(PEMBundle $bundle): void /** - * @depends testBundle - * * @param \SimpleSAML\XMLSecurity\CryptoEncoding\PEMBundle $bundle */ + #[Depends('testBundle')] public function testFirst(PEMBundle $bundle): void { $this->assertInstanceOf(PEM::class, $bundle->first()); @@ -66,10 +65,9 @@ public function testFirst(PEMBundle $bundle): void /** - * @depends testBundle - * * @param \SimpleSAML\XMLSecurity\CryptoEncoding\PEMBundle $bundle */ + #[Depends('testBundle')] public function testLast(PEMBundle $bundle): void { $this->assertInstanceOf(PEM::class, $bundle->last()); @@ -78,10 +76,9 @@ public function testLast(PEMBundle $bundle): void /** - * @depends testBundle - * * @param \SimpleSAML\XMLSecurity\CryptoEncoding\PEMBundle $bundle */ + #[Depends('testBundle')] public function testCount(PEMBundle $bundle): void { $this->assertCount(150, $bundle); @@ -89,10 +86,9 @@ public function testCount(PEMBundle $bundle): void /** - * @depends testBundle - * * @param \SimpleSAML\XMLSecurity\CryptoEncoding\PEMBundle $bundle */ + #[Depends('testBundle')] public function testIterator(PEMBundle $bundle): void { $values = []; @@ -104,10 +100,9 @@ public function testIterator(PEMBundle $bundle): void /** - * @depends testBundle - * * @param \SimpleSAML\XMLSecurity\CryptoEncoding\PEMBundle $bundle */ + #[Depends('testBundle')] public function testString(PEMBundle $bundle): void { $this->assertIsString($bundle->string()); @@ -115,10 +110,9 @@ public function testString(PEMBundle $bundle): void /** - * @depends testBundle - * * @param \SimpleSAML\XMLSecurity\CryptoEncoding\PEMBundle $bundle */ + #[Depends('testBundle')] public function testToString(PEMBundle $bundle): void { $this->assertIsString(strval($bundle)); @@ -168,10 +162,9 @@ public function testLastEmptyFail(): void /** - * @depends testBundle - * * @param \SimpleSAML\XMLSecurity\CryptoEncoding\PEMBundle $bundle */ + #[Depends('testBundle')] public function testWithPEMs(PEMBundle $bundle): void { $bundle = $bundle->withPEMs(new PEM('TEST', 'data')); diff --git a/tests/CryptoEncoding/PEMTest.php b/tests/CryptoEncoding/PEMTest.php index d011a31d..efb40835 100644 --- a/tests/CryptoEncoding/PEMTest.php +++ b/tests/CryptoEncoding/PEMTest.php @@ -4,6 +4,8 @@ namespace SimpleSAML\XMLSecurity\Test\CryptoEncoding; +use PHPUnit\Framework\Attributes\Depends; +use PHPUnit\Framework\Attributes\Group; use PHPUnit\Framework\TestCase; use RuntimeException; use SimpleSAML\XMLSecurity\CryptoEncoding\PEM; @@ -14,10 +16,9 @@ use function file_get_contents; /** - * @group pem - * * @internal */ +#[Group('pem')] class PEMTest extends TestCase { private static string $baseDir; @@ -51,10 +52,9 @@ public function testFromFile(): PEM /** - * @depends testFromFile - * * @param \SimpleSAML\XMLSecurity\CryptoEncoding\PEM $pem */ + #[Depends('testFromFile')] public function testType(PEM $pem): void { $this->assertEquals(PEM::TYPE_PUBLIC_KEY, $pem->type()); @@ -101,10 +101,9 @@ public function testInvalidFile(): void /** - * @depends testFromFile - * * @param \SimpleSAML\XMLSecurity\CryptoEncoding\PEM $pem */ + #[Depends('testFromFile')] public function testString(PEM $pem): void { $this->assertIsString($pem->string()); @@ -112,10 +111,9 @@ public function testString(PEM $pem): void /** - * @depends testFromFile - * * @param \SimpleSAML\XMLSecurity\CryptoEncoding\PEM $pem */ + #[Depends('testFromFile')] public function testToString(PEM $pem): void { $this->assertIsString(strval($pem)); diff --git a/tests/Utils/CertificateTest.php b/tests/Utils/CertificateTest.php index c4be876b..c2961314 100644 --- a/tests/Utils/CertificateTest.php +++ b/tests/Utils/CertificateTest.php @@ -4,20 +4,21 @@ namespace SimpleSAML\XMLSecurity\Test\Utils; +use PHPUnit\Framework\Attributes\CoversClass; +use PHPUnit\Framework\Attributes\Group; +use PHPUnit\Framework\Attributes\Test; use PHPUnit\Framework\TestCase; use SimpleSAML\XMLSecurity\TestUtils\PEMCertificatesMock; use SimpleSAML\XMLSecurity\Utils\Certificate; /** - * @covers \SimpleSAML\XMLSecurity\Utils\Certificate * @package simplesamlphp/xml-security */ +#[Group('utilities')] +#[CoversClass(Certificate::class)] final class CertificateTest extends TestCase { - /** - * @group utilities - * @test - */ + #[Test] public function testValidStructure(): void { $result = Certificate::hasValidStructure( @@ -32,10 +33,7 @@ public function testValidStructure(): void } - /** - * @group utilities - * @test - */ + #[Test] public function testConvertToCertificate(): void { $result = Certificate::convertToCertificate(PEMCertificatesMock::getPlainCertificateContents()); @@ -44,8 +42,7 @@ public function testConvertToCertificate(): void } - /** - */ + #[Test] public function testParseIssuer(): void { // Test string input diff --git a/tests/XML/CustomSignableTest.php b/tests/XML/CustomSignableTest.php index 8781b0ab..87587e34 100644 --- a/tests/XML/CustomSignableTest.php +++ b/tests/XML/CustomSignableTest.php @@ -4,6 +4,7 @@ namespace SimpleSAML\XMLSecurity\Test\XML; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use SimpleSAML\XML\DOMDocumentFactory; use SimpleSAML\XML\TestUtils\SerializableElementTestTrait; @@ -15,9 +16,9 @@ /** * Class \SimpleSAML\XMLSecurity\Test\XML\CustomSignableTest * - * @covers \SimpleSAML\XMLSecurity\Test\XML\CustomSignable * @package simplesamlphp/xml-security */ +#[CoversClass(CustomSignable::class)] final class CustomSignableTest extends TestCase { use SerializableElementTestTrait; diff --git a/tests/XML/EncryptedCustomTest.php b/tests/XML/EncryptedCustomTest.php index c859feda..aceabbc2 100644 --- a/tests/XML/EncryptedCustomTest.php +++ b/tests/XML/EncryptedCustomTest.php @@ -5,6 +5,7 @@ namespace SimpleSAML\XMLSecurity\Test\XML; use DOMElement; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use SimpleSAML\XML\DOMDocumentFactory; use SimpleSAML\XMLSecurity\Alg\Encryption\EncryptionAlgorithmFactory; @@ -13,19 +14,21 @@ use SimpleSAML\XMLSecurity\Key\PrivateKey; use SimpleSAML\XMLSecurity\Key\PublicKey; use SimpleSAML\XMLSecurity\Key\SymmetricKey; +use SimpleSAML\XMLSecurity\Test\XML\EncryptedCustom; use SimpleSAML\XMLSecurity\TestUtils\PEMCertificatesMock; +use SimpleSAML\XMLSecurity\XML\EncryptableElementTrait; +use SimpleSAML\XMLSecurity\XML\EncryptedElementTrait; use function dirname; /** * Class \SimpleSAML\XMLSecurity\Test\XML\EncryptedCustomTest * - * @covers \SimpleSAML\XMLSecurity\XML\EncryptableElementTrait - * @covers \SimpleSAML\XMLSecurity\XML\EncryptedElementTrait - * @covers \SimpleSAML\XMLSecurity\Test\XML\EncryptedCustom - * * @package simplesamlphp/xml-security */ +#[CoversClass(EncryptableElementTrait::class)] +#[CoversClass(EncryptedElementTrait::class)] +#[CoversClass(EncryptedCustom::class)] class EncryptedCustomTest extends TestCase { /** @var \DOMElement */ diff --git a/tests/XML/SignableElementTest.php b/tests/XML/SignableElementTest.php index 18bce49c..15004181 100644 --- a/tests/XML/SignableElementTest.php +++ b/tests/XML/SignableElementTest.php @@ -5,6 +5,7 @@ namespace SimpleSAML\XMLSecurity\Test\XML; use DOMDocument; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use SimpleSAML\XML\DOMDocumentFactory; use SimpleSAML\XML\TestUtils\SerializableElementTestTrait; @@ -12,6 +13,7 @@ use SimpleSAML\XMLSecurity\Constants as C; use SimpleSAML\XMLSecurity\Exception\RuntimeException; use SimpleSAML\XMLSecurity\Key\PrivateKey; +use SimpleSAML\XMLSecurity\Test\XML\CustomSignable; use SimpleSAML\XMLSecurity\TestUtils\PEMCertificatesMock; use SimpleSAML\XMLSecurity\XML\ds\KeyInfo; use SimpleSAML\XMLSecurity\XML\ds\X509Certificate; @@ -28,10 +30,9 @@ /** * Class \SimpleSAML\XMLSecurity\Test\XML\SignableElementTest * - * @covers \SimpleSAML\XMLSecurity\Test\XML\CustomSignable - * * @package simplesamlphp/xml-security */ +#[CoversClass(CustomSignable::class)] final class SignableElementTest extends TestCase { use SerializableElementTestTrait; diff --git a/tests/XML/SignedElementTest.php b/tests/XML/SignedElementTest.php index f897e830..21d4bb88 100644 --- a/tests/XML/SignedElementTest.php +++ b/tests/XML/SignedElementTest.php @@ -5,6 +5,7 @@ namespace SimpleSAML\XMLSecurity\Test\XML; use DOMElement; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use SimpleSAML\XML\DOMDocumentFactory; use SimpleSAML\XMLSecurity\Alg\Signature\SignatureAlgorithmFactory; @@ -13,8 +14,10 @@ use SimpleSAML\XMLSecurity\Exception\RuntimeException; use SimpleSAML\XMLSecurity\Key\PublicKey; use SimpleSAML\XMLSecurity\Key\X509Certificate; +use SimpleSAML\XMLSecurity\Test\XML\CustomSignable; use SimpleSAML\XMLSecurity\TestUtils\PEMCertificatesMock; use SimpleSAML\XMLSecurity\XML\ds\Signature; +use SimpleSAML\XMLSecurity\XML\SignedElementTrait; use function dirname; use function strval; @@ -22,11 +25,10 @@ /** * Class \SimpleSAML\XMLSecurity\Test\XML\SignedElementTest * - * @covers \SimpleSAML\XMLSecurity\XML\SignedElementTrait - * @covers \SimpleSAML\XMLSecurity\Test\XML\CustomSignable - * * @package simplesamlphp/xml-security */ +#[CoversClass(SignedElementTrait::class)] +#[CoversClass(CustomSignable::class)] final class SignedElementTest extends TestCase { /** @var \SimpleSAML\XMLSecurity\CryptoEncoding\PEM */ diff --git a/tests/XML/ds/CanonicalizationMethodTest.php b/tests/XML/ds/CanonicalizationMethodTest.php index 67b11b93..32185f75 100644 --- a/tests/XML/ds/CanonicalizationMethodTest.php +++ b/tests/XML/ds/CanonicalizationMethodTest.php @@ -4,11 +4,13 @@ namespace SimpleSAML\XMLSecurity\Test\XML\ds; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use SimpleSAML\XML\DOMDocumentFactory; use SimpleSAML\XML\TestUtils\SchemaValidationTestTrait; use SimpleSAML\XML\TestUtils\SerializableElementTestTrait; use SimpleSAML\XMLSecurity\Constants as C; +use SimpleSAML\XMLSecurity\XML\ds\AbstractDsElement; use SimpleSAML\XMLSecurity\XML\ds\CanonicalizationMethod; use function dirname; @@ -16,11 +18,10 @@ /** * Class \SimpleSAML\XMLSecurity\Test\XML\ds\CanonicalizationMethodTest * - * @covers \SimpleSAML\XMLSecurity\XML\ds\AbstractDsElement - * @covers \SimpleSAML\XMLSecurity\XML\ds\CanonicalizationMethod - * * @package simplesamlphp/xml-security */ +#[CoversClass(AbstractDsElement::class)] +#[CoversClass(CanonicalizationMethod::class)] final class CanonicalizationMethodTest extends TestCase { use SchemaValidationTestTrait; diff --git a/tests/XML/ds/DigestMethodTest.php b/tests/XML/ds/DigestMethodTest.php index d89c8b10..d98a2a40 100644 --- a/tests/XML/ds/DigestMethodTest.php +++ b/tests/XML/ds/DigestMethodTest.php @@ -4,12 +4,14 @@ namespace SimpleSAML\XMLSecurity\Test\XML\ds; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use SimpleSAML\XML\Chunk; use SimpleSAML\XML\DOMDocumentFactory; use SimpleSAML\XML\TestUtils\SchemaValidationTestTrait; use SimpleSAML\XML\TestUtils\SerializableElementTestTrait; use SimpleSAML\XMLSecurity\Constants as C; +use SimpleSAML\XMLSecurity\XML\ds\AbstractDsElement; use SimpleSAML\XMLSecurity\XML\ds\DigestMethod; use function dirname; @@ -18,11 +20,10 @@ /** * Class \SimpleSAML\XMLSecurity\XML\Test\ds\DigestMethodTest * - * @covers \SimpleSAML\XMLSecurity\XML\ds\AbstractDsElement - * @covers \SimpleSAML\XMLSecurity\XML\ds\DigestMethod - * * @package simplesamlphp/xml-security */ +#[CoversClass(AbstractDsElement::class)] +#[CoversClass(DigestMethod::class)] final class DigestMethodTest extends TestCase { use SchemaValidationTestTrait; diff --git a/tests/XML/ds/DigestValueTest.php b/tests/XML/ds/DigestValueTest.php index 8724b15f..cc6565aa 100644 --- a/tests/XML/ds/DigestValueTest.php +++ b/tests/XML/ds/DigestValueTest.php @@ -4,12 +4,14 @@ namespace SimpleSAML\XMLSecurity\Test\XML\ds; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use SimpleSAML\Assert\AssertionFailedException; use SimpleSAML\XML\DOMDocumentFactory; use SimpleSAML\XML\TestUtils\SchemaValidationTestTrait; use SimpleSAML\XML\TestUtils\SerializableElementTestTrait; use SimpleSAML\XMLSecurity\Test\XML\XMLDumper; +use SimpleSAML\XMLSecurity\XML\ds\AbstractDsElement; use SimpleSAML\XMLSecurity\XML\ds\DigestValue; use function dirname; @@ -18,11 +20,10 @@ /** * Class \SimpleSAML\XMLSecurity\Test\XML\ds\DigestValueTest * - * @covers \SimpleSAML\XMLSecurity\XML\ds\AbstractDsElement - * @covers \SimpleSAML\XMLSecurity\XML\ds\DigestValue - * * @package simplesamlphp/xml-security */ +#[CoversClass(AbstractDsElement::class)] +#[CoversClass(DigestValue::class)] final class DigestValueTest extends TestCase { use SchemaValidationTestTrait; diff --git a/tests/XML/ds/ExponentTest.php b/tests/XML/ds/ExponentTest.php index ff9e098c..bf094a0a 100644 --- a/tests/XML/ds/ExponentTest.php +++ b/tests/XML/ds/ExponentTest.php @@ -4,11 +4,13 @@ namespace SimpleSAML\XMLSecurity\Test\XML\ds; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use SimpleSAML\XML\DOMDocumentFactory; use SimpleSAML\XML\Exception\SchemaViolationException; use SimpleSAML\XML\TestUtils\SerializableElementTestTrait; use SimpleSAML\XMLSecurity\Test\XML\XMLDumper; +use SimpleSAML\XMLSecurity\XML\ds\AbstractDsElement; use SimpleSAML\XMLSecurity\XML\ds\Exponent; use function dirname; @@ -17,11 +19,10 @@ /** * Class \SimpleSAML\XMLSecurity\Test\XML\ds\ExponentTest * - * @covers \SimpleSAML\XMLSecurity\XML\ds\AbstractDsElement - * @covers \SimpleSAML\XMLSecurity\XML\ds\Exponent - * * @package simplesamlphp/xml-security */ +#[CoversClass(AbstractDsElement::class)] +#[CoversClass(Exponent::class)] final class ExponentTest extends TestCase { use SerializableElementTestTrait; diff --git a/tests/XML/ds/KeyInfoTest.php b/tests/XML/ds/KeyInfoTest.php index 8054aa1d..68fe7eae 100644 --- a/tests/XML/ds/KeyInfoTest.php +++ b/tests/XML/ds/KeyInfoTest.php @@ -4,6 +4,7 @@ namespace SimpleSAML\XMLSecurity\Test\XML\ds; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use SimpleSAML\XML\Chunk; use SimpleSAML\XML\DOMDocumentFactory; @@ -11,6 +12,7 @@ use SimpleSAML\XML\TestUtils\SerializableElementTestTrait; use SimpleSAML\XMLSecurity\Exception\InvalidArgumentException; use SimpleSAML\XMLSecurity\TestUtils\PEMCertificatesMock; +use SimpleSAML\XMLSecurity\XML\ds\AbstractDsElement; use SimpleSAML\XMLSecurity\XML\ds\KeyInfo; use SimpleSAML\XMLSecurity\XML\ds\KeyName; use SimpleSAML\XMLSecurity\XML\ds\X509Certificate; @@ -25,11 +27,10 @@ /** * Class \SimpleSAML\XMLSecurity\Test\XML\ds\KeyInfoTest * - * @covers \SimpleSAML\XMLSecurity\XML\ds\AbstractDsElement - * @covers \SimpleSAML\XMLSecurity\XML\ds\KeyInfo - * * @package simplesamlphp/xml-security */ +#[CoversClass(AbstractDsElement::class)] +#[CoversClass(KeyInfo::class)] final class KeyInfoTest extends TestCase { use SchemaValidationTestTrait; diff --git a/tests/XML/ds/KeyNameTest.php b/tests/XML/ds/KeyNameTest.php index e613c502..96fb9490 100644 --- a/tests/XML/ds/KeyNameTest.php +++ b/tests/XML/ds/KeyNameTest.php @@ -4,10 +4,12 @@ namespace SimpleSAML\XMLSecurity\Test\XML\ds; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use SimpleSAML\XML\DOMDocumentFactory; use SimpleSAML\XML\TestUtils\SchemaValidationTestTrait; use SimpleSAML\XML\TestUtils\SerializableElementTestTrait; +use SimpleSAML\XMLSecurity\XML\ds\AbstractDsElement; use SimpleSAML\XMLSecurity\XML\ds\KeyName; use function dirname; @@ -16,11 +18,10 @@ /** * Class \SimpleSAML\XMLSecurity\Test\XML\ds\KeyNameTest * - * @covers \SimpleSAML\XMLSecurity\XML\ds\AbstractDsElement - * @covers \SimpleSAML\XMLSecurity\XML\ds\KeyName - * * @package simplesamlphp/xml-security */ +#[CoversClass(AbstractDsElement::class)] +#[CoversClass(KeyName::class)] final class KeyNameTest extends TestCase { use SchemaValidationTestTrait; diff --git a/tests/XML/ds/KeyValueTest.php b/tests/XML/ds/KeyValueTest.php index 2b6e546f..46b65424 100644 --- a/tests/XML/ds/KeyValueTest.php +++ b/tests/XML/ds/KeyValueTest.php @@ -5,12 +5,14 @@ namespace SimpleSAML\XMLSecurity\Test\XML\ds; use DOMDocument; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use SimpleSAML\XML\Chunk; use SimpleSAML\XML\DOMDocumentFactory; use SimpleSAML\XML\Exception\SchemaViolationException; use SimpleSAML\XML\TestUtils\SchemaValidationTestTrait; use SimpleSAML\XML\TestUtils\SerializableElementTestTrait; +use SimpleSAML\XMLSecurity\XML\ds\AbstractDsElement; use SimpleSAML\XMLSecurity\XML\ds\KeyValue; use SimpleSAML\XMLSecurity\XML\ds\RSAKeyValue; @@ -20,11 +22,10 @@ /** * Class \SimpleSAML\XMLSecurity\Test\XML\ds\KeyValueTest * - * @covers \SimpleSAML\XMLSecurity\XML\ds\AbstractDsElement - * @covers \SimpleSAML\XMLSecurity\XML\ds\KeyValue - * * @package simplesamlphp/xml-security */ +#[CoversClass(AbstractDsElement::class)] +#[CoversClass(KeyValue::class)] final class KeyValueTest extends TestCase { use SchemaValidationTestTrait; diff --git a/tests/XML/ds/ManifestTest.php b/tests/XML/ds/ManifestTest.php index d3acb9fd..103eae99 100644 --- a/tests/XML/ds/ManifestTest.php +++ b/tests/XML/ds/ManifestTest.php @@ -4,11 +4,13 @@ namespace SimpleSAML\XMLSecurity\Test\XML\ds; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use SimpleSAML\XML\DOMDocumentFactory; use SimpleSAML\XML\TestUtils\SchemaValidationTestTrait; use SimpleSAML\XML\TestUtils\SerializableElementTestTrait; use SimpleSAML\XMLSecurity\Constants as C; +use SimpleSAML\XMLSecurity\XML\ds\AbstractDsElement; use SimpleSAML\XMLSecurity\XML\ds\DigestMethod; use SimpleSAML\XMLSecurity\XML\ds\DigestValue; use SimpleSAML\XMLSecurity\XML\ds\Manifest; @@ -22,11 +24,10 @@ /** * Class \SimpleSAML\XMLSecurity\Test\XML\ds\ManifestTest * - * @covers \SimpleSAML\XMLSecurity\XML\ds\Manifest - * @covers \SimpleSAML\XMLSecurity\XML\ds\AbstractDsElement - * * @package simplesamlphp/saml2 */ +#[CoversClass(AbstractDsElement::class)] +#[CoversClass(Manifest::class)] final class ManifestTest extends TestCase { use SchemaValidationTestTrait; diff --git a/tests/XML/ds/ModulusTest.php b/tests/XML/ds/ModulusTest.php index d0c49717..1d0d5bb5 100644 --- a/tests/XML/ds/ModulusTest.php +++ b/tests/XML/ds/ModulusTest.php @@ -4,11 +4,13 @@ namespace SimpleSAML\XMLSecurity\Test\XML\ds; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use SimpleSAML\XML\DOMDocumentFactory; use SimpleSAML\XML\Exception\SchemaViolationException; use SimpleSAML\XML\TestUtils\SerializableElementTestTrait; use SimpleSAML\XMLSecurity\Test\XML\XMLDumper; +use SimpleSAML\XMLSecurity\XML\ds\AbstractDsElement; use SimpleSAML\XMLSecurity\XML\ds\Modulus; use function dirname; @@ -17,11 +19,10 @@ /** * Class \SimpleSAML\XMLSecurity\Test\XML\ds\ModulusTest * - * @covers \SimpleSAML\XMLSecurity\XML\ds\AbstractDsElement - * @covers \SimpleSAML\XMLSecurity\XML\ds\Modulus - * * @package simplesamlphp/xml-security */ +#[CoversClass(AbstractDsElement::class)] +#[CoversClass(Modulus::class)] final class ModulusTest extends TestCase { use SerializableElementTestTrait; diff --git a/tests/XML/ds/ObjectTest.php b/tests/XML/ds/ObjectTest.php index 8ac452c3..da707673 100644 --- a/tests/XML/ds/ObjectTest.php +++ b/tests/XML/ds/ObjectTest.php @@ -4,21 +4,22 @@ namespace SimpleSAML\XMLSecurity\Test\XML\ds; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use SimpleSAML\XML\Chunk; use SimpleSAML\XML\DOMDocumentFactory; use SimpleSAML\XML\TestUtils\SchemaValidationTestTrait; use SimpleSAML\XML\TestUtils\SerializableElementTestTrait; +use SimpleSAML\XMLSecurity\XML\ds\AbstractDsElement; use SimpleSAML\XMLSecurity\XML\ds\DsObject; /** * Class \SimpleSAML\XMLSecurity\XML\Test\ds\ObjectTest * - * @covers \SimpleSAML\XMLSecurity\XML\ds\AbstractDsElement - * @covers \SimpleSAML\XMLSecurity\XML\ds\DsObject - * * @package simplesamlphp/xml-security */ +#[CoversClass(AbstractDsElement::class)] +#[CoversClass(DsObject::class)] final class ObjectTest extends TestCase { use SchemaValidationTestTrait; diff --git a/tests/XML/ds/RSAKeyValueTest.php b/tests/XML/ds/RSAKeyValueTest.php index 91ca8f63..7bb563ae 100644 --- a/tests/XML/ds/RSAKeyValueTest.php +++ b/tests/XML/ds/RSAKeyValueTest.php @@ -4,11 +4,13 @@ namespace SimpleSAML\XMLSecurity\Test\XML\ds; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use SimpleSAML\XML\DOMDocumentFactory; use SimpleSAML\XML\TestUtils\SchemaValidationTestTrait; use SimpleSAML\XML\TestUtils\SerializableElementTestTrait; use SimpleSAML\XML\Utils\XPath; +use SimpleSAML\XMLSecurity\XML\ds\AbstractDsElement; use SimpleSAML\XMLSecurity\XML\ds\Exponent; use SimpleSAML\XMLSecurity\XML\ds\Modulus; use SimpleSAML\XMLSecurity\XML\ds\RSAKeyValue; @@ -19,11 +21,10 @@ /** * Class \SimpleSAML\XMLSecurity\Test\XML\ds\RSAKeyValueTest * - * @covers \SimpleSAML\XMLSecurity\XML\ds\AbstractDsElement - * @covers \SimpleSAML\XMLSecurity\XML\ds\RSAKeyValue - * * @package simplesamlphp/xml-security */ +#[CoversClass(AbstractDsElement::class)] +#[CoversClass(RSAKeyValue::class)] final class RSAKeyValueTest extends TestCase { use SchemaValidationTestTrait; diff --git a/tests/XML/ds/ReferenceTest.php b/tests/XML/ds/ReferenceTest.php index 6d6df44e..025c8ad6 100644 --- a/tests/XML/ds/ReferenceTest.php +++ b/tests/XML/ds/ReferenceTest.php @@ -4,11 +4,13 @@ namespace SimpleSAML\XMLSecurity\Test\XML\ds; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use SimpleSAML\XML\DOMDocumentFactory; use SimpleSAML\XML\TestUtils\SchemaValidationTestTrait; use SimpleSAML\XML\TestUtils\SerializableElementTestTrait; use SimpleSAML\XMLSecurity\Constants as C; +use SimpleSAML\XMLSecurity\XML\ds\AbstractDsElement; use SimpleSAML\XMLSecurity\XML\ds\DigestMethod; use SimpleSAML\XMLSecurity\XML\ds\DigestValue; use SimpleSAML\XMLSecurity\XML\ds\Reference; @@ -21,11 +23,10 @@ /** * Class \SimpleSAML\XMLSecurity\Test\XML\ds\ReferenceTest * - * @covers \SimpleSAML\XMLSecurity\XML\ds\Reference - * @covers \SimpleSAML\XMLSecurity\XML\ds\AbstractDsElement - * * @package simplesamlphp/saml2 */ +#[CoversClass(AbstractDsElement::class)] +#[CoversClass(Reference::class)] final class ReferenceTest extends TestCase { use SchemaValidationTestTrait; diff --git a/tests/XML/ds/RetrievalMethodTest.php b/tests/XML/ds/RetrievalMethodTest.php index 388c69ae..45e25b8f 100644 --- a/tests/XML/ds/RetrievalMethodTest.php +++ b/tests/XML/ds/RetrievalMethodTest.php @@ -4,11 +4,13 @@ namespace SimpleSAML\XMLSecurity\Test\XML\ds; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use SimpleSAML\XML\DOMDocumentFactory; use SimpleSAML\XML\TestUtils\SchemaValidationTestTrait; use SimpleSAML\XML\TestUtils\SerializableElementTestTrait; use SimpleSAML\XMLSecurity\Constants as C; +use SimpleSAML\XMLSecurity\XML\ds\AbstractDsElement; use SimpleSAML\XMLSecurity\XML\ds\RetrievalMethod; use SimpleSAML\XMLSecurity\XML\ds\Transform; use SimpleSAML\XMLSecurity\XML\ds\Transforms; @@ -20,11 +22,10 @@ /** * Class \SimpleSAML\XMLSecurity\Test\XML\ds\RetrievalMethodTest * - * @covers \SimpleSAML\XMLSecurity\XML\ds\RetrievalMethod - * @covers \SimpleSAML\XMLSecurity\XML\ds\AbstractDsElement - * * @package simplesamlphp/saml2 */ +#[CoversClass(AbstractDsElement::class)] +#[CoversClass(RetrievalMethod::class)] final class RetrievalMethodTest extends TestCase { use SchemaValidationTestTrait; diff --git a/tests/XML/ds/SignatureMethodTest.php b/tests/XML/ds/SignatureMethodTest.php index 348378ac..62097e7b 100644 --- a/tests/XML/ds/SignatureMethodTest.php +++ b/tests/XML/ds/SignatureMethodTest.php @@ -4,11 +4,13 @@ namespace SimpleSAML\XMLSecurity\Test\XML\ds; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use SimpleSAML\XML\DOMDocumentFactory; use SimpleSAML\XML\TestUtils\SchemaValidationTestTrait; use SimpleSAML\XML\TestUtils\SerializableElementTestTrait; use SimpleSAML\XMLSecurity\Constants as C; +use SimpleSAML\XMLSecurity\XML\ds\AbstractDsElement; use SimpleSAML\XMLSecurity\XML\ds\SignatureMethod; use function dirname; @@ -17,11 +19,10 @@ /** * Class \SimpleSAML\XMLSecurity\Test\XML\ds\SignatureMethodTest * - * @covers \SimpleSAML\XMLSecurity\XML\ds\AbstractDsElement - * @covers \SimpleSAML\XMLSecurity\XML\ds\SignatureMethod - * * @package simplesamlphp/xml-security */ +#[CoversClass(AbstractDsElement::class)] +#[CoversClass(SignatureMethod::class)] final class SignatureMethodTest extends TestCase { use SchemaValidationTestTrait; diff --git a/tests/XML/ds/SignaturePropertiesTest.php b/tests/XML/ds/SignaturePropertiesTest.php index cdaf1f71..1e44b7fa 100644 --- a/tests/XML/ds/SignaturePropertiesTest.php +++ b/tests/XML/ds/SignaturePropertiesTest.php @@ -4,11 +4,13 @@ namespace SimpleSAML\XMLSecurity\Test\XML\ds; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use SimpleSAML\XML\Chunk; use SimpleSAML\XML\DOMDocumentFactory; use SimpleSAML\XML\TestUtils\SchemaValidationTestTrait; use SimpleSAML\XML\TestUtils\SerializableElementTestTrait; +use SimpleSAML\XMLSecurity\XML\ds\AbstractDsElement; use SimpleSAML\XMLSecurity\XML\ds\SignatureProperties; use SimpleSAML\XMLSecurity\XML\ds\SignatureProperty; @@ -18,11 +20,10 @@ /** * Class \SimpleSAML\XMLSecurity\Test\XML\ds\SignaturePropertiesTest * - * @covers \SimpleSAML\XMLSecurity\XML\ds\SignatureProperties - * @covers \SimpleSAML\XMLSecurity\XML\ds\AbstractDsElement - * * @package simplesamlphp/saml2 */ +#[CoversClass(AbstractDsElement::class)] +#[CoversClass(SignatureProperties::class)] final class SignaturePropertiesTest extends TestCase { use SchemaValidationTestTrait; diff --git a/tests/XML/ds/SignaturePropertyTest.php b/tests/XML/ds/SignaturePropertyTest.php index 933ac844..23415df1 100644 --- a/tests/XML/ds/SignaturePropertyTest.php +++ b/tests/XML/ds/SignaturePropertyTest.php @@ -4,11 +4,13 @@ namespace SimpleSAML\XMLSecurity\Test\XML\ds; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use SimpleSAML\XML\Chunk; use SimpleSAML\XML\DOMDocumentFactory; use SimpleSAML\XML\TestUtils\SchemaValidationTestTrait; use SimpleSAML\XML\TestUtils\SerializableElementTestTrait; +use SimpleSAML\XMLSecurity\XML\ds\AbstractDsElement; use SimpleSAML\XMLSecurity\XML\ds\SignatureProperty; use function dirname; @@ -17,11 +19,10 @@ /** * Class \SimpleSAML\XMLSecurity\Test\XML\ds\SignaturePropertyTest * - * @covers \SimpleSAML\XMLSecurity\XML\ds\SignatureProperty - * @covers \SimpleSAML\XMLSecurity\XML\ds\AbstractDsElement - * * @package simplesamlphp/saml2 */ +#[CoversClass(AbstractDsElement::class)] +#[CoversClass(SignatureProperty::class)] final class SignaturePropertyTest extends TestCase { use SchemaValidationTestTrait; diff --git a/tests/XML/ds/SignatureTest.php b/tests/XML/ds/SignatureTest.php index ee50d235..42ad0763 100644 --- a/tests/XML/ds/SignatureTest.php +++ b/tests/XML/ds/SignatureTest.php @@ -4,12 +4,14 @@ namespace SimpleSAML\XMLSecurity\Test\XML\ds; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use SimpleSAML\XML\Chunk; use SimpleSAML\XML\DOMDocumentFactory; use SimpleSAML\XML\TestUtils\SchemaValidationTestTrait; use SimpleSAML\XML\TestUtils\SerializableElementTestTrait; use SimpleSAML\XMLSecurity\Utils\XPath; +use SimpleSAML\XMLSecurity\XML\ds\AbstractDsElement; use SimpleSAML\XMLSecurity\XML\ds\DsObject; use SimpleSAML\XMLSecurity\XML\ds\KeyInfo; use SimpleSAML\XMLSecurity\XML\ds\Signature; @@ -22,11 +24,10 @@ /** * Class \SimpleSAML\XMLSecurity\Test\XML\ds\SignatureTest * - * @covers \SimpleSAML\XMLSecurity\XML\ds\AbstractDsElement - * @covers \SimpleSAML\XMLSecurity\XML\ds\Signature - * * @package simplesamlphp/xml-security */ +#[CoversClass(AbstractDsElement::class)] +#[CoversClass(Signature::class)] final class SignatureTest extends TestCase { use SchemaValidationTestTrait; diff --git a/tests/XML/ds/SignatureValueTest.php b/tests/XML/ds/SignatureValueTest.php index cf81be06..571269a8 100644 --- a/tests/XML/ds/SignatureValueTest.php +++ b/tests/XML/ds/SignatureValueTest.php @@ -4,11 +4,13 @@ namespace SimpleSAML\XMLSecurity\Test\XML\ds; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use SimpleSAML\Assert\AssertionFailedException; use SimpleSAML\XML\DOMDocumentFactory; use SimpleSAML\XML\TestUtils\SchemaValidationTestTrait; use SimpleSAML\XML\TestUtils\SerializableElementTestTrait; +use SimpleSAML\XMLSecurity\XML\ds\AbstractDsElement; use SimpleSAML\XMLSecurity\XML\ds\SignatureValue; use function dirname; @@ -17,11 +19,10 @@ /** * Class \SimpleSAML\XMLSecurity\Test\XML\ds\SignatureValueTest * - * @covers \SimpleSAML\XMLSecurity\XML\ds\AbstractDsElement - * @covers \SimpleSAML\XMLSecurity\XML\ds\SignatureValue - * * @package simplesamlphp/xml-security */ +#[CoversClass(AbstractDsElement::class)] +#[CoversClass(SignatureValue::class)] final class SignatureValueTest extends TestCase { use SchemaValidationTestTrait; diff --git a/tests/XML/ds/SignedInfoTest.php b/tests/XML/ds/SignedInfoTest.php index 13e0b660..715b2c1e 100644 --- a/tests/XML/ds/SignedInfoTest.php +++ b/tests/XML/ds/SignedInfoTest.php @@ -5,11 +5,13 @@ namespace SimpleSAML\XMLSecurity\Test\XML\ds; use DOMElement; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use SimpleSAML\XML\DOMDocumentFactory; use SimpleSAML\XML\TestUtils\SchemaValidationTestTrait; use SimpleSAML\XML\TestUtils\SerializableElementTestTrait; use SimpleSAML\XMLSecurity\Constants as C; +use SimpleSAML\XMLSecurity\XML\ds\AbstractDsElement; use SimpleSAML\XMLSecurity\XML\ds\CanonicalizationMethod; use SimpleSAML\XMLSecurity\XML\ds\Reference; use SimpleSAML\XMLSecurity\XML\ds\SignatureMethod; @@ -21,11 +23,10 @@ /** * Class \SimpleSAML\XMLSecurity\Test\XML\ds\SignedInfoTest * - * @covers \SimpleSAML\XMLSecurity\XML\ds\SignedInfo - * @covers \SimpleSAML\XMLSecurity\XML\ds\AbstractDsElement - * * @package simplesamlphp/xml-security */ +#[CoversClass(AbstractDsElement::class)] +#[CoversClass(SignedInfo::class)] final class SignedInfoTest extends TestCase { use SchemaValidationTestTrait; diff --git a/tests/XML/ds/TransformTest.php b/tests/XML/ds/TransformTest.php index 1464ed8d..13e37cbe 100644 --- a/tests/XML/ds/TransformTest.php +++ b/tests/XML/ds/TransformTest.php @@ -4,11 +4,13 @@ namespace SimpleSAML\XMLSecurity\Test\XML\ds; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use SimpleSAML\XML\DOMDocumentFactory; use SimpleSAML\XML\TestUtils\SchemaValidationTestTrait; use SimpleSAML\XML\TestUtils\SerializableElementTestTrait; use SimpleSAML\XMLSecurity\Constants as C; +use SimpleSAML\XMLSecurity\XML\ds\AbstractDsElement; use SimpleSAML\XMLSecurity\XML\ds\Transform; use SimpleSAML\XMLSecurity\XML\ds\XPath; use SimpleSAML\XMLSecurity\XML\ec\InclusiveNamespaces; @@ -19,11 +21,10 @@ /** * Class \SimpleSAML\XMLSecurity\Test\XML\ds\TransformTest * - * @covers \SimpleSAML\XMLSecurity\XML\ds\Transform - * @covers \SimpleSAML\XMLSecurity\XML\ds\AbstractDsElement - * * @package simplesamlphp/xml-security */ +#[CoversClass(AbstractDsElement::class)] +#[CoversClass(Transform::class)] final class TransformTest extends TestCase { use SchemaValidationTestTrait; diff --git a/tests/XML/ds/TransformsTest.php b/tests/XML/ds/TransformsTest.php index 8b150bc1..633f0aaa 100644 --- a/tests/XML/ds/TransformsTest.php +++ b/tests/XML/ds/TransformsTest.php @@ -4,11 +4,13 @@ namespace SimpleSAML\XMLSecurity\Test\XML\ds; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use SimpleSAML\XML\DOMDocumentFactory; use SimpleSAML\XML\TestUtils\SchemaValidationTestTrait; use SimpleSAML\XML\TestUtils\SerializableElementTestTrait; use SimpleSAML\XMLSecurity\Constants as C; +use SimpleSAML\XMLSecurity\XML\ds\AbstractDsElement; use SimpleSAML\XMLSecurity\XML\ds\Transform; use SimpleSAML\XMLSecurity\XML\ds\Transforms; use SimpleSAML\XMLSecurity\XML\ds\XPath; @@ -19,11 +21,10 @@ /** * Class \SimpleSAML\XMLSecurity\Test\XML\ds\TransformsTest * - * @covers \SimpleSAML\XMLSecurity\XML\ds\Transforms - * @covers \SimpleSAML\XMLSecurity\XML\ds\AbstractDsElement - * * @package simplesamlphp/xml-security */ +#[CoversClass(AbstractDsElement::class)] +#[CoversClass(Transforms::class)] final class TransformsTest extends TestCase { use SchemaValidationTestTrait; diff --git a/tests/XML/ds/X509CertificateTest.php b/tests/XML/ds/X509CertificateTest.php index 25897b34..85f7e8a9 100644 --- a/tests/XML/ds/X509CertificateTest.php +++ b/tests/XML/ds/X509CertificateTest.php @@ -4,12 +4,14 @@ namespace SimpleSAML\XMLSecurity\Test\XML\ds; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use SimpleSAML\Assert\AssertionFailedException; use SimpleSAML\XML\DOMDocumentFactory; use SimpleSAML\XML\TestUtils\SerializableElementTestTrait; use SimpleSAML\XMLSecurity\Test\XML\XMLDumper; use SimpleSAML\XMLSecurity\TestUtils\PEMCertificatesMock; +use SimpleSAML\XMLSecurity\XML\ds\AbstractDsElement; use SimpleSAML\XMLSecurity\XML\ds\X509Certificate; use function dirname; @@ -20,11 +22,10 @@ /** * Class \SimpleSAML\XMLSecurity\Test\XML\ds\X509CertificateTest * - * @covers \SimpleSAML\XMLSecurity\XML\ds\AbstractDsElement - * @covers \SimpleSAML\XMLSecurity\XML\ds\X509Certificate - * * @package simplesamlphp/xml-security */ +#[CoversClass(AbstractDsElement::class)] +#[CoversClass(X509Certificate::class)] final class X509CertificateTest extends TestCase { use SerializableElementTestTrait; diff --git a/tests/XML/ds/X509DataTest.php b/tests/XML/ds/X509DataTest.php index 1941ab79..176aef63 100644 --- a/tests/XML/ds/X509DataTest.php +++ b/tests/XML/ds/X509DataTest.php @@ -4,12 +4,14 @@ namespace SimpleSAML\XMLSecurity\Test\XML\ds; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use SimpleSAML\XML\Chunk; use SimpleSAML\XML\DOMDocumentFactory; use SimpleSAML\XML\TestUtils\SchemaValidationTestTrait; use SimpleSAML\XML\TestUtils\SerializableElementTestTrait; use SimpleSAML\XMLSecurity\TestUtils\PEMCertificatesMock; +use SimpleSAML\XMLSecurity\XML\ds\AbstractDsElement; use SimpleSAML\XMLSecurity\XML\ds\X509Certificate; use SimpleSAML\XMLSecurity\XML\ds\X509Data; use SimpleSAML\XMLSecurity\XML\ds\X509IssuerName; @@ -25,11 +27,10 @@ /** * Class \SimpleSAML\XMLSecurity\Test\XML\ds\X509DataTest * - * @covers \SimpleSAML\XMLSecurity\XML\ds\AbstractDsElement - * @covers \SimpleSAML\XMLSecurity\XML\ds\X509Data - * * @package simplesamlphp/xml-security */ +#[CoversClass(AbstractDsElement::class)] +#[CoversClass(X509Data::class)] final class X509DataTest extends TestCase { use SchemaValidationTestTrait; diff --git a/tests/XML/ds/X509IssuerNameTest.php b/tests/XML/ds/X509IssuerNameTest.php index 35931fad..91f65ad3 100644 --- a/tests/XML/ds/X509IssuerNameTest.php +++ b/tests/XML/ds/X509IssuerNameTest.php @@ -4,9 +4,11 @@ namespace SimpleSAML\XMLSecurity\Test\XML\ds; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use SimpleSAML\XML\DOMDocumentFactory; use SimpleSAML\XML\TestUtils\SerializableElementTestTrait; +use SimpleSAML\XMLSecurity\XML\ds\AbstractDsElement; use SimpleSAML\XMLSecurity\XML\ds\X509IssuerName; use function dirname; @@ -15,11 +17,10 @@ /** * Class \SimpleSAML\XMLSecurity\XML\ds\X509IssuerNameTest * - * @covers \SimpleSAML\XMLSecurity\XML\ds\AbstractDsElement - * @covers \SimpleSAML\XMLSecurity\XML\ds\X509IssuerName - * * @package simplesamlphp/xml-security */ +#[CoversClass(AbstractDsElement::class)] +#[CoversClass(X509IssuerName::class)] final class X509IssuerNameTest extends TestCase { use SerializableElementTestTrait; diff --git a/tests/XML/ds/X509IssuerSerialTest.php b/tests/XML/ds/X509IssuerSerialTest.php index 80a75780..b8658966 100644 --- a/tests/XML/ds/X509IssuerSerialTest.php +++ b/tests/XML/ds/X509IssuerSerialTest.php @@ -4,6 +4,7 @@ namespace SimpleSAML\XMLSecurity\Test\XML\ds; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use SimpleSAML\XML\DOMDocumentFactory; use SimpleSAML\XML\TestUtils\SerializableElementTestTrait; @@ -12,6 +13,7 @@ use SimpleSAML\XMLSecurity\TestUtils\PEMCertificatesMock; use SimpleSAML\XMLSecurity\Utils\Certificate as CertificateUtils; use SimpleSAML\XMLSecurity\Utils\XPath; +use SimpleSAML\XMLSecurity\XML\ds\AbstractDsElement; use SimpleSAML\XMLSecurity\XML\ds\X509IssuerName; use SimpleSAML\XMLSecurity\XML\ds\X509IssuerSerial; use SimpleSAML\XMLSecurity\XML\ds\X509SerialNumber; @@ -22,11 +24,10 @@ /** * Class \SimpleSAML\XMLSecurity\XML\ds\X509IssuerSerial * - * @covers \SimpleSAML\XMLSecurity\XML\ds\AbstractDsElement - * @covers \SimpleSAML\XMLSecurity\XML\ds\X509IssuerSerial - * * @package simplesamlphp/xml-security */ +#[CoversClass(AbstractDsElement::class)] +#[CoversClass(X509IssuerSerial::class)] final class X509IssuerSerialTest extends TestCase { use SerializableElementTestTrait; diff --git a/tests/XML/ds/X509SerialNumberTest.php b/tests/XML/ds/X509SerialNumberTest.php index 98f5a701..ee0f8077 100644 --- a/tests/XML/ds/X509SerialNumberTest.php +++ b/tests/XML/ds/X509SerialNumberTest.php @@ -4,10 +4,12 @@ namespace SimpleSAML\XMLSecurity\Test\XML\ds; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use SimpleSAML\XML\DOMDocumentFactory; use SimpleSAML\XML\Exception\SchemaViolationException; use SimpleSAML\XML\TestUtils\SerializableElementTestTrait; +use SimpleSAML\XMLSecurity\XML\ds\AbstractDsElement; use SimpleSAML\XMLSecurity\XML\ds\X509SerialNumber; use function dirname; @@ -16,11 +18,10 @@ /** * Class \SimpleSAML\XMLSecurity\XML\ds\X509SerialNumberTest * - * @covers \SimpleSAML\XMLSecurity\XML\ds\AbstractDsElement - * @covers \SimpleSAML\XMLSecurity\XML\ds\X509SerialNumber - * * @package simplesamlphp/xml-security */ +#[CoversClass(AbstractDsElement::class)] +#[CoversClass(X509SerialNumber::class)] final class X509SerialNumberTest extends TestCase { use SerializableElementTestTrait; diff --git a/tests/XML/ds/X509SubjectNameTest.php b/tests/XML/ds/X509SubjectNameTest.php index f83f24e8..cec3e0b8 100644 --- a/tests/XML/ds/X509SubjectNameTest.php +++ b/tests/XML/ds/X509SubjectNameTest.php @@ -4,9 +4,11 @@ namespace SimpleSAML\XMLSecurity\Test\XML\ds; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use SimpleSAML\XML\DOMDocumentFactory; use SimpleSAML\XML\TestUtils\SerializableElementTestTrait; +use SimpleSAML\XMLSecurity\XML\ds\AbstractDsElement; use SimpleSAML\XMLSecurity\XML\ds\X509SubjectName; use function dirname; @@ -15,11 +17,10 @@ /** * Class \SimpleSAML\XMLSecurity\Test\XML\ds\X509SubjectNameTest * - * @covers \SimpleSAML\XMLSecurity\XML\ds\AbstractDsElement - * @covers \SimpleSAML\XMLSecurity\XML\ds\X509SubjectName - * * @package simplesamlphp/xml-security */ +#[CoversClass(AbstractDsElement::class)] +#[CoversClass(X509SubjectName::class)] final class X509SubjectNameTest extends TestCase { use SerializableElementTestTrait; diff --git a/tests/XML/ds/XPathTest.php b/tests/XML/ds/XPathTest.php index 2c9e3483..6f503c72 100644 --- a/tests/XML/ds/XPathTest.php +++ b/tests/XML/ds/XPathTest.php @@ -4,9 +4,11 @@ namespace SimpleSAML\XMLSecurity\Test\XML\ds; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use SimpleSAML\XML\DOMDocumentFactory; use SimpleSAML\XML\TestUtils\SerializableElementTestTrait; +use SimpleSAML\XMLSecurity\XML\ds\AbstractDsElement; use SimpleSAML\XMLSecurity\XML\ds\XPath; use function dirname; @@ -15,10 +17,10 @@ /** * Class \SimpleSAML\XMLSecurity\Test\XML\ds\XPathTest * - * @covers \SimpleSAML\XMLSecurity\XML\ds\XPath - * * @package simplesamlphp/xml-security */ +#[CoversClass(AbstractDsElement::class)] +#[CoversClass(XPath::class)] class XPathTest extends TestCase { use SerializableElementTestTrait; diff --git a/tests/XML/dsig11/KeyInfoReferenceTest.php b/tests/XML/dsig11/KeyInfoReferenceTest.php index da4e3cf2..5daa9a32 100644 --- a/tests/XML/dsig11/KeyInfoReferenceTest.php +++ b/tests/XML/dsig11/KeyInfoReferenceTest.php @@ -4,10 +4,12 @@ namespace SimpleSAML\XMLSecurity\Test\XML\dsig11; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use SimpleSAML\XML\DOMDocumentFactory; use SimpleSAML\XML\TestUtils\SchemaValidationTestTrait; use SimpleSAML\XML\TestUtils\SerializableElementTestTrait; +use SimpleSAML\XMLSecurity\XML\dsig11\AbstractDsig11Element; use SimpleSAML\XMLSecurity\XML\dsig11\KeyInfoReference; use function dirname; @@ -16,11 +18,10 @@ /** * Class \SimpleSAML\XMLSecurity\Test\XML\dsig11\KeyInfoReferenceTest * - * @covers \SimpleSAML\XMLSecurity\XML\dsig11\AbstractDsig11Element - * @covers \SimpleSAML\XMLSecurity\XML\dsig11\KeyInfoReference - * * @package simplesamlphp/xml-security */ +#[CoversClass(AbstractDsig11Element::class)] +#[CoversClass(KeyInfoReference::class)] final class KeyInfoReferenceTest extends TestCase { use SchemaValidationTestTrait; diff --git a/tests/XML/dsig11/X509DigestTest.php b/tests/XML/dsig11/X509DigestTest.php index 9307d962..29674705 100644 --- a/tests/XML/dsig11/X509DigestTest.php +++ b/tests/XML/dsig11/X509DigestTest.php @@ -4,6 +4,7 @@ namespace SimpleSAML\XMLSecurity\Test\XML\dsig11; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use SimpleSAML\XML\DOMDocumentFactory; use SimpleSAML\XML\TestUtils\SchemaValidationTestTrait; @@ -13,6 +14,7 @@ use SimpleSAML\XMLSecurity\Key; use SimpleSAML\XMLSecurity\Test\XML\XMLDumper; use SimpleSAML\XMLSecurity\TestUtils\PEMCertificatesMock; +use SimpleSAML\XMLSecurity\XML\dsig11\AbstractDsig11Element; use SimpleSAML\XMLSecurity\XML\dsig11\X509Digest; use function base64_encode; @@ -23,11 +25,10 @@ /** * Class \SimpleSAML\XMLSecurity\Test\XML\dsig11\X509DigestTest * - * @covers \SimpleSAML\XMLSecurity\XML\dsig11\AbstractDsig11Element - * @covers \SimpleSAML\XMLSecurity\XML\dsig11\X509Digest - * * @package simplesamlphp/xml-security */ +#[CoversClass(AbstractDsig11Element::class)] +#[CoversClass(X509Digest::class)] final class X509DigestTest extends TestCase { use SchemaValidationTestTrait; diff --git a/tests/XML/ec/InclusiveNamespacesTest.php b/tests/XML/ec/InclusiveNamespacesTest.php index cae8e02e..b1c65da5 100644 --- a/tests/XML/ec/InclusiveNamespacesTest.php +++ b/tests/XML/ec/InclusiveNamespacesTest.php @@ -4,10 +4,12 @@ namespace SimpleSAML\XMLSecurity\Test\XML\ec; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use SimpleSAML\XML\DOMDocumentFactory; use SimpleSAML\XML\TestUtils\SchemaValidationTestTrait; use SimpleSAML\XML\TestUtils\SerializableElementTestTrait; +use SimpleSAML\XMLSecurity\XML\ec\AbstractEcElement; use SimpleSAML\XMLSecurity\XML\ec\InclusiveNamespaces; use function dirname; @@ -16,11 +18,10 @@ /** * Class \SimpleSAML\XMLSecurity\Test\XML\ec\InclusiveNamespacesTest * - * @covers \SimpleSAML\XMLSecurity\XML\ec\InclusiveNamespaces - * @covers \SimpleSAML\XMLSecurity\XML\ec\AbstractEcElement - * * @package simplesamlphp/xml-security */ +#[CoversClass(AbstractEcElement::class)] +#[CoversClass(InclusiveNamespaces::class)] class InclusiveNamespacesTest extends TestCase { use SchemaValidationTestTrait; diff --git a/tests/XML/xenc/CarriedKeyNameTest.php b/tests/XML/xenc/CarriedKeyNameTest.php index 5c87bfd5..b5758c00 100644 --- a/tests/XML/xenc/CarriedKeyNameTest.php +++ b/tests/XML/xenc/CarriedKeyNameTest.php @@ -4,9 +4,11 @@ namespace SimpleSAML\XMLSecurity\Test\XML\xenc; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use SimpleSAML\XML\DOMDocumentFactory; use SimpleSAML\XML\TestUtils\SerializableElementTestTrait; +use SimpleSAML\XMLSecurity\XML\xenc\AbstractXencElement; use SimpleSAML\XMLSecurity\XML\xenc\CarriedKeyName; use function dirname; @@ -20,6 +22,8 @@ * * @package simplesamlphp/xml-security */ +#[CoversClass(AbstractXencElement::class)] +#[CoversClass(CarriedKeyName::class)] final class CarriedKeyNameTest extends TestCase { use SerializableElementTestTrait; diff --git a/tests/XML/xenc/CipherDataTest.php b/tests/XML/xenc/CipherDataTest.php index 4bda7d19..069dc96c 100644 --- a/tests/XML/xenc/CipherDataTest.php +++ b/tests/XML/xenc/CipherDataTest.php @@ -4,10 +4,12 @@ namespace SimpleSAML\XMLSecurity\Test\XML\xenc; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use SimpleSAML\XML\DOMDocumentFactory; use SimpleSAML\XML\TestUtils\SchemaValidationTestTrait; use SimpleSAML\XML\TestUtils\SerializableElementTestTrait; +use SimpleSAML\XMLSecurity\XML\xenc\AbstractXencElement; use SimpleSAML\XMLSecurity\XML\xenc\CipherData; use SimpleSAML\XMLSecurity\XML\xenc\CipherValue; @@ -22,6 +24,8 @@ * * @package simplesamlphp/xml-security */ +#[CoversClass(AbstractXencElement::class)] +#[CoversClass(CipherData::class)] final class CipherDataTest extends TestCase { use SchemaValidationTestTrait; diff --git a/tests/XML/xenc/CipherReferenceTest.php b/tests/XML/xenc/CipherReferenceTest.php index 568b9437..87f99636 100644 --- a/tests/XML/xenc/CipherReferenceTest.php +++ b/tests/XML/xenc/CipherReferenceTest.php @@ -4,6 +4,7 @@ namespace SimpleSAML\XMLSecurity\Test\XML\xenc; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use SimpleSAML\XML\DOMDocumentFactory; use SimpleSAML\XML\TestUtils\SchemaValidationTestTrait; @@ -11,6 +12,8 @@ use SimpleSAML\XMLSecurity\Constants as C; use SimpleSAML\XMLSecurity\XML\ds\Transform; use SimpleSAML\XMLSecurity\XML\ds\XPath; +use SimpleSAML\XMLSecurity\XML\xenc\AbstractReference; +use SimpleSAML\XMLSecurity\XML\xenc\AbstractXencElement; use SimpleSAML\XMLSecurity\XML\xenc\CipherReference; use SimpleSAML\XMLSecurity\XML\xenc\Transforms; @@ -26,6 +29,9 @@ * * @package simplesamlphp/xml-security */ +#[CoversClass(AbstractXencElement::class)] +#[CoversClass(AbstractReference::class)] +#[CoversClass(CipherReference::class)] final class CipherReferenceTest extends TestCase { use SchemaValidationTestTrait; diff --git a/tests/XML/xenc/CipherValueTest.php b/tests/XML/xenc/CipherValueTest.php index 9c8ffad8..9b264fd8 100644 --- a/tests/XML/xenc/CipherValueTest.php +++ b/tests/XML/xenc/CipherValueTest.php @@ -4,11 +4,13 @@ namespace SimpleSAML\XMLSecurity\Test\XML\xenc; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use SimpleSAML\Assert\AssertionFailedException; use SimpleSAML\XML\DOMDocumentFactory; use SimpleSAML\XML\TestUtils\SerializableElementTestTrait; use SimpleSAML\XMLSecurity\Test\XML\XMLDumper; +use SimpleSAML\XMLSecurity\XML\xenc\AbstractXencElement; use SimpleSAML\XMLSecurity\XML\xenc\CipherValue; use function dirname; @@ -22,6 +24,8 @@ * * @package simplesamlphp/xml-security */ +#[CoversClass(AbstractXencElement::class)] +#[CoversClass(CipherValue::class)] final class CipherValueTest extends TestCase { use SerializableElementTestTrait; diff --git a/tests/XML/xenc/DataReferenceTest.php b/tests/XML/xenc/DataReferenceTest.php index bd108cf5..26bfad96 100644 --- a/tests/XML/xenc/DataReferenceTest.php +++ b/tests/XML/xenc/DataReferenceTest.php @@ -4,6 +4,7 @@ namespace SimpleSAML\XMLSecurity\Test\XML\xenc; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use SimpleSAML\XML\DOMDocumentFactory; use SimpleSAML\XML\TestUtils\SerializableElementTestTrait; @@ -11,6 +12,8 @@ use SimpleSAML\XMLSecurity\XML\ds\Transform; use SimpleSAML\XMLSecurity\XML\ds\Transforms; use SimpleSAML\XMLSecurity\XML\ds\XPath; +use SimpleSAML\XMLSecurity\XML\xenc\AbstractReference; +use SimpleSAML\XMLSecurity\XML\xenc\AbstractXencElement; use SimpleSAML\XMLSecurity\XML\xenc\DataReference; use function dirname; @@ -25,6 +28,9 @@ * * @package simplesamlphp/xml-security */ +#[CoversClass(AbstractXencElement::class)] +#[CoversClass(AbstractReference::class)] +#[CoversClass(DataReference::class)] final class DataReferenceTest extends TestCase { use SerializableElementTestTrait; diff --git a/tests/XML/xenc/EncryptedDataTest.php b/tests/XML/xenc/EncryptedDataTest.php index 125e8021..791149b7 100644 --- a/tests/XML/xenc/EncryptedDataTest.php +++ b/tests/XML/xenc/EncryptedDataTest.php @@ -4,12 +4,15 @@ namespace SimpleSAML\XMLSecurity\Test\XML\xenc; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use SimpleSAML\XML\DOMDocumentFactory; use SimpleSAML\XML\TestUtils\SchemaValidationTestTrait; use SimpleSAML\XML\TestUtils\SerializableElementTestTrait; use SimpleSAML\XMLSecurity\Utils\XPath; use SimpleSAML\XMLSecurity\XML\ds\KeyInfo; +use SimpleSAML\XMLSecurity\XML\xenc\AbstractEncryptedType; +use SimpleSAML\XMLSecurity\XML\xenc\AbstractXencElement; use SimpleSAML\XMLSecurity\XML\xenc\CipherData; use SimpleSAML\XMLSecurity\XML\xenc\CipherValue; use SimpleSAML\XMLSecurity\XML\xenc\EncryptedData; @@ -28,6 +31,9 @@ * * @package simplesamlphp/xml-security */ +#[CoversClass(AbstractXencElement::class)] +#[CoversClass(AbstractEncryptedType::class)] +#[CoversClass(EncryptedData::class)] final class EncryptedDataTest extends TestCase { use SchemaValidationTestTrait; diff --git a/tests/XML/xenc/EncryptedKeyTest.php b/tests/XML/xenc/EncryptedKeyTest.php index f2178676..42bf8cd4 100644 --- a/tests/XML/xenc/EncryptedKeyTest.php +++ b/tests/XML/xenc/EncryptedKeyTest.php @@ -4,6 +4,7 @@ namespace SimpleSAML\XMLSecurity\Test\XML\xenc; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use SimpleSAML\XML\DOMDocumentFactory; use SimpleSAML\XML\TestUtils\SchemaValidationTestTrait; @@ -16,6 +17,8 @@ use SimpleSAML\XMLSecurity\TestUtils\PEMCertificatesMock; use SimpleSAML\XMLSecurity\Utils\XPath; use SimpleSAML\XMLSecurity\XML\ds\KeyInfo; +use SimpleSAML\XMLSecurity\XML\xenc\AbstractEncryptedType; +use SimpleSAML\XMLSecurity\XML\xenc\AbstractXencElement; use SimpleSAML\XMLSecurity\XML\xenc\CarriedKeyName; use SimpleSAML\XMLSecurity\XML\xenc\CipherData; use SimpleSAML\XMLSecurity\XML\xenc\CipherValue; @@ -37,6 +40,9 @@ * * @package simplesamlphp/xml-security */ +#[CoversClass(AbstractXencElement::class)] +#[CoversClass(AbstractEncryptedType::class)] +#[CoversClass(EncryptedKey::class)] final class EncryptedKeyTest extends TestCase { use SchemaValidationTestTrait; diff --git a/tests/XML/xenc/EncryptionMethodTest.php b/tests/XML/xenc/EncryptionMethodTest.php index a7dcf112..1104f9a2 100644 --- a/tests/XML/xenc/EncryptionMethodTest.php +++ b/tests/XML/xenc/EncryptionMethodTest.php @@ -4,6 +4,7 @@ namespace SimpleSAML\XMLSecurity\Test\XML\xenc; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use SimpleSAML\XML\Chunk; use SimpleSAML\XML\DOMDocumentFactory; @@ -11,6 +12,8 @@ use SimpleSAML\XML\TestUtils\SerializableElementTestTrait; use SimpleSAML\XMLSecurity\Constants as C; use SimpleSAML\XMLSecurity\Utils\XPath; +use SimpleSAML\XMLSecurity\XML\xenc\AbstractEncryptionMethod; +use SimpleSAML\XMLSecurity\XML\xenc\AbstractXencElement; use SimpleSAML\XMLSecurity\XML\xenc\EncryptionMethod; use SimpleSAML\XMLSecurity\XML\xenc\KeySize; use SimpleSAML\XMLSecurity\XML\xenc\OAEPparams; @@ -26,6 +29,9 @@ * @covers \SimpleSAML\XMLSecurity\XML\xenc\EncryptionMethod * @package simplesamlphp/xml-security */ +#[CoversClass(AbstractXencElement::class)] +#[CoversClass(AbstractEncryptionMethod::class)] +#[CoversClass(EncryptionMethod::class)] final class EncryptionMethodTest extends TestCase { use SerializableElementTestTrait; diff --git a/tests/XML/xenc/EncryptionPropertiesTest.php b/tests/XML/xenc/EncryptionPropertiesTest.php index cf06752e..198439b4 100644 --- a/tests/XML/xenc/EncryptionPropertiesTest.php +++ b/tests/XML/xenc/EncryptionPropertiesTest.php @@ -4,6 +4,7 @@ namespace SimpleSAML\XMLSecurity\Test\XML\xenc; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use SimpleSAML\XML\Attribute as XMLAttribute; use SimpleSAML\XML\Chunk; @@ -11,6 +12,8 @@ use SimpleSAML\XML\DOMDocumentFactory; use SimpleSAML\XML\TestUtils\SchemaValidationTestTrait; use SimpleSAML\XML\TestUtils\SerializableElementTestTrait; +use SimpleSAML\XMLSecurity\XML\xenc\AbstractEncryptionPropertiesType; +use SimpleSAML\XMLSecurity\XML\xenc\AbstractXencElement; use SimpleSAML\XMLSecurity\XML\xenc\EncryptionProperties; use SimpleSAML\XMLSecurity\XML\xenc\EncryptionProperty; @@ -26,6 +29,9 @@ * * @package simplesamlphp/xml-security */ +#[CoversClass(AbstractXencElement::class)] +#[CoversClass(AbstractEncryptionPropertiesType::class)] +#[CoversClass(EncryptionProperties::class)] final class EncryptionPropertiesTest extends TestCase { use SchemaValidationTestTrait; diff --git a/tests/XML/xenc/EncryptionPropertyTest.php b/tests/XML/xenc/EncryptionPropertyTest.php index 3ffcd9bd..26f33c78 100644 --- a/tests/XML/xenc/EncryptionPropertyTest.php +++ b/tests/XML/xenc/EncryptionPropertyTest.php @@ -4,6 +4,7 @@ namespace SimpleSAML\XMLSecurity\Test\XML\xenc; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use SimpleSAML\XML\Attribute as XMLAttribute; use SimpleSAML\XML\Chunk; @@ -11,6 +12,8 @@ use SimpleSAML\XML\DOMDocumentFactory; use SimpleSAML\XML\TestUtils\SchemaValidationTestTrait; use SimpleSAML\XML\TestUtils\SerializableElementTestTrait; +use SimpleSAML\XMLSecurity\XML\xenc\AbstractEncryptionPropertyType; +use SimpleSAML\XMLSecurity\XML\xenc\AbstractXencElement; use SimpleSAML\XMLSecurity\XML\xenc\EncryptionProperty; use function dirname; @@ -25,6 +28,9 @@ * * @package simplesamlphp/xml-security */ +#[CoversClass(AbstractXencElement::class)] +#[CoversClass(AbstractEncryptionPropertyType::class)] +#[CoversClass(EncryptionProperty::class)] final class EncryptionPropertyTest extends TestCase { use SchemaValidationTestTrait; diff --git a/tests/XML/xenc/KeyReferenceTest.php b/tests/XML/xenc/KeyReferenceTest.php index ad0868d8..310fe42c 100644 --- a/tests/XML/xenc/KeyReferenceTest.php +++ b/tests/XML/xenc/KeyReferenceTest.php @@ -4,6 +4,7 @@ namespace SimpleSAML\XMLSecurity\Test\XML\xenc; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use SimpleSAML\XML\DOMDocumentFactory; use SimpleSAML\XML\TestUtils\SerializableElementTestTrait; @@ -11,6 +12,8 @@ use SimpleSAML\XMLSecurity\XML\ds\Transform; use SimpleSAML\XMLSecurity\XML\ds\Transforms; use SimpleSAML\XMLSecurity\XML\ds\XPath; +use SimpleSAML\XMLSecurity\XML\xenc\AbstractReference; +use SimpleSAML\XMLSecurity\XML\xenc\AbstractXencElement; use SimpleSAML\XMLSecurity\XML\xenc\KeyReference; use function dirname; @@ -25,6 +28,9 @@ * * @package simplesamlphp/xml-security */ +#[CoversClass(AbstractXencElement::class)] +#[CoversClass(AbstractReference::class)] +#[CoversClass(KeyReference::class)] final class KeyReferenceTest extends TestCase { use SerializableElementTestTrait; diff --git a/tests/XML/xenc/KeySizeTest.php b/tests/XML/xenc/KeySizeTest.php index 3b224347..b5502619 100644 --- a/tests/XML/xenc/KeySizeTest.php +++ b/tests/XML/xenc/KeySizeTest.php @@ -4,9 +4,11 @@ namespace SimpleSAML\XMLSecurity\Test\XML\xenc; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use SimpleSAML\XML\DOMDocumentFactory; use SimpleSAML\XML\TestUtils\SerializableElementTestTrait; +use SimpleSAML\XMLSecurity\XML\xenc\AbstractXencElement; use SimpleSAML\XMLSecurity\XML\xenc\KeySize; use function dirname; @@ -20,6 +22,8 @@ * * @package simplesamlphp/xml-security */ +#[CoversClass(AbstractXencElement::class)] +#[CoversClass(KeySize::class)] final class KeySizeTest extends TestCase { use SerializableElementTestTrait; diff --git a/tests/XML/xenc/OAEPparamsTest.php b/tests/XML/xenc/OAEPparamsTest.php index 666f45c6..8132e424 100644 --- a/tests/XML/xenc/OAEPparamsTest.php +++ b/tests/XML/xenc/OAEPparamsTest.php @@ -4,9 +4,11 @@ namespace SimpleSAML\XMLSecurity\Test\XML\xenc; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use SimpleSAML\XML\DOMDocumentFactory; use SimpleSAML\XML\TestUtils\SerializableElementTestTrait; +use SimpleSAML\XMLSecurity\XML\xenc\AbstractXencElement; use SimpleSAML\XMLSecurity\XML\xenc\OAEPparams; use function dirname; @@ -20,6 +22,8 @@ * * @package simplesamlphp/xml-security */ +#[CoversClass(AbstractXencElement::class)] +#[CoversClass(OAEPparams::class)] final class OAEPparamsTest extends TestCase { use SerializableElementTestTrait; diff --git a/tests/XML/xenc/ReferenceListTest.php b/tests/XML/xenc/ReferenceListTest.php index 15b7c07d..6a8ebf16 100644 --- a/tests/XML/xenc/ReferenceListTest.php +++ b/tests/XML/xenc/ReferenceListTest.php @@ -4,6 +4,7 @@ namespace SimpleSAML\XMLSecurity\Test\XML\xenc; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use SimpleSAML\XML\DOMDocumentFactory; use SimpleSAML\XML\TestUtils\SchemaValidationTestTrait; @@ -12,6 +13,7 @@ use SimpleSAML\XMLSecurity\XML\ds\Transform; use SimpleSAML\XMLSecurity\XML\ds\Transforms; use SimpleSAML\XMLSecurity\XML\ds\XPath; +use SimpleSAML\XMLSecurity\XML\xenc\AbstractXencElement; use SimpleSAML\XMLSecurity\XML\xenc\DataReference; use SimpleSAML\XMLSecurity\XML\xenc\KeyReference; use SimpleSAML\XMLSecurity\XML\xenc\ReferenceList; @@ -27,6 +29,8 @@ * * @package simplesamlphp/xml-security */ +#[CoversClass(AbstractXencElement::class)] +#[CoversClass(ReferenceList::class)] final class ReferenceListTest extends TestCase { use SchemaValidationTestTrait; diff --git a/tests/XML/xenc/TransformsTest.php b/tests/XML/xenc/TransformsTest.php index 3b5b0b9e..5aa93f7d 100644 --- a/tests/XML/xenc/TransformsTest.php +++ b/tests/XML/xenc/TransformsTest.php @@ -4,12 +4,14 @@ namespace SimpleSAML\XMLSecurity\Test\XML\xenc; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use SimpleSAML\XML\DOMDocumentFactory; use SimpleSAML\XML\TestUtils\SerializableElementTestTrait; use SimpleSAML\XMLSecurity\Constants as C; use SimpleSAML\XMLSecurity\XML\ds\Transform; use SimpleSAML\XMLSecurity\XML\ds\XPath; +use SimpleSAML\XMLSecurity\XML\xenc\AbstractXencElement; use SimpleSAML\XMLSecurity\XML\xenc\Transforms; use function dirname; @@ -23,6 +25,8 @@ * * @package simplesamlphp/xml-security */ +#[CoversClass(AbstractXencElement::class)] +#[CoversClass(Transforms::class)] final class TransformsTest extends TestCase { use SerializableElementTestTrait;