diff --git a/tests/InterOperability/EntitiesDescriptorTest.php b/tests/InterOperability/EntitiesDescriptorTest.php index 55a1b0839..1d271e827 100644 --- a/tests/InterOperability/EntitiesDescriptorTest.php +++ b/tests/InterOperability/EntitiesDescriptorTest.php @@ -5,6 +5,7 @@ namespace SimpleSAML\Test\SAML2; use DOMElement; +use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\TestCase; use SimpleSAML\Assert\AssertionFailedException; use SimpleSAML\SAML2\XML\md\EntitiesDescriptor; @@ -18,10 +19,10 @@ final class EntitiesDescriptorTest extends TestCase { /** - * @dataProvider provideMetadata * @param boolean $shouldPass * @param \DOMElement $metadata; */ + #[DataProvider('provideMetadata')] public function testUnmarshalling(bool $shouldPass, DOMElement $metadata): void { try { diff --git a/tests/SAML2/Certificate/KeyTest.php b/tests/SAML2/Certificate/KeyTest.php index 7d5b52b3b..36c244286 100644 --- a/tests/SAML2/Certificate/KeyTest.php +++ b/tests/SAML2/Certificate/KeyTest.php @@ -4,6 +4,9 @@ namespace SimpleSAML\Test\SAML2\Certificate; +use PHPUnit\Framework\Attributes\DataProvider; +use PHPUnit\Framework\Attributes\Group; +use PHPUnit\Framework\Attributes\Test; use PHPUnit\Framework\TestCase; use SimpleSAML\SAML2\Certificate\Exception\InvalidKeyUsageException; use SimpleSAML\SAML2\Certificate\Key; @@ -15,12 +18,12 @@ * @covers \SimpleSAML\SAML2\Certificate\Key * @package simplesamlphp/saml2 */ +#[Group('certificate')] final class KeyTest extends TestCase { /** - * @group certificate - * @test */ + #[Test] public function invalidKeyUsageShouldThrowAnException(): void { $key = new Key([Key::USAGE_SIGNING => true]); @@ -30,10 +33,9 @@ public function invalidKeyUsageShouldThrowAnException(): void /** - * @group certificate - * @dataProvider functionProvider - * @test */ + #[DataProvider('functionProvider')] + #[Test] public function invalidOffsetTypeShouldThrowAnException($function, $params): void { $key = new Key([Key::USAGE_SIGNING => true]); @@ -43,9 +45,8 @@ public function invalidOffsetTypeShouldThrowAnException($function, $params): voi /** - * @group certificate - * @test */ + #[Test] public function assertThatKeyUsageCheckWorksCorrectly(): void { $key = new Key([Key::USAGE_SIGNING => true]); @@ -59,9 +60,8 @@ public function assertThatKeyUsageCheckWorksCorrectly(): void /** - * @group certificate - * @test */ + #[Test] public function assertThatOffsetgetWorksCorrectly(): void { $key = new Key([Key::USAGE_SIGNING => true]); @@ -70,9 +70,8 @@ public function assertThatOffsetgetWorksCorrectly(): void /** - * @group certificate - * @test */ + #[Test] public function assertThatOffsetunsetUnsetsOffset(): void { $key = new Key([Key::USAGE_SIGNING => true, Key::USAGE_ENCRYPTION => true]); diff --git a/tests/SAML2/Certificate/PrivateKeyLoaderTest.php b/tests/SAML2/Certificate/PrivateKeyLoaderTest.php index 5d3f6ebc2..78d2e7f43 100644 --- a/tests/SAML2/Certificate/PrivateKeyLoaderTest.php +++ b/tests/SAML2/Certificate/PrivateKeyLoaderTest.php @@ -4,6 +4,8 @@ namespace SimpleSAML\Test\SAML2\Certificate; +use PHPUnit\Framework\Attributes\DataProvider; +use PHPUnit\Framework\Attributes\Test; use PHPUnit\Framework\TestCase; use SimpleSAML\SAML2\Certificate\PrivateKey; use SimpleSAML\SAML2\Certificate\PrivateKeyLoader; @@ -29,12 +31,11 @@ public static function setUpBeforeClass(): void /** - * @group certificate - * @test - * @dataProvider privateKeyTestProvider - * * @param \SimpleSAML\SAML2\Configuration\PrivateKey $configuredKey */ + #[Test] + #[Group('certificate')] + #[DataProvider('privateKeyTestProvider')] public function loadingAConfiguredPrivateKeyReturnsACertificatePrivateKey( ConfPrivateKey $configuredKey ): void { diff --git a/tests/SAML2/XML/alg/DigestMethodTest.php b/tests/SAML2/XML/alg/DigestMethodTest.php index 83903c5a8..d057b73e4 100644 --- a/tests/SAML2/XML/alg/DigestMethodTest.php +++ b/tests/SAML2/XML/alg/DigestMethodTest.php @@ -4,7 +4,9 @@ namespace SimpleSAML\Test\SAML2\XML\alg; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; +use SimpleSAML\SAML2\XML\alg\AbstractAlgElement; use SimpleSAML\SAML2\XML\alg\DigestMethod; use SimpleSAML\Test\SAML2\Constants as C; use SimpleSAML\XML\Chunk; @@ -19,11 +21,10 @@ /** * Class \SAML2\XML\alg\DigestMethodTest * - * @covers \SimpleSAML\SAML2\XML\alg\AbstractAlgElement - * @covers \SimpleSAML\SAML2\XML\alg\DigestMethod - * * @package simplesamlphp/saml2 */ +#[CoversClass(DigestMethod::class)] +#[CoversClass(AbstractAlgElement::class)] final class DigestMethodTest extends TestCase { use SerializableElementTestTrait; diff --git a/tests/SAML2/XML/alg/SigningMethodTest.php b/tests/SAML2/XML/alg/SigningMethodTest.php index 7123f99f0..effd3a341 100644 --- a/tests/SAML2/XML/alg/SigningMethodTest.php +++ b/tests/SAML2/XML/alg/SigningMethodTest.php @@ -4,7 +4,9 @@ namespace SimpleSAML\Test\SAML2\XML\alg; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; +use SimpleSAML\SAML2\XML\alg\AbstractAlgElement; use SimpleSAML\SAML2\XML\alg\SigningMethod; use SimpleSAML\Test\SAML2\Constants as C; use SimpleSAML\XML\Chunk; @@ -19,11 +21,10 @@ /** * Class \SAML2\XML\alg\SigningMethodTest * - * @covers \SimpleSAML\SAML2\XML\alg\AbstractAlgElement - * @covers \SimpleSAML\SAML2\XML\alg\SigningMethod - * * @package simplesamlphp/saml2 */ +#[CoversClass(SigningMethod::class)] +#[CoversClass(AbstractAlgElement::class)] final class SigningMethodTest extends TestCase { use SerializableElementTestTrait; diff --git a/tests/SAML2/XML/ecp/RelayStateTest.php b/tests/SAML2/XML/ecp/RelayStateTest.php index 379ac30ef..76056d4a9 100644 --- a/tests/SAML2/XML/ecp/RelayStateTest.php +++ b/tests/SAML2/XML/ecp/RelayStateTest.php @@ -4,7 +4,9 @@ namespace SimpleSAML\Test\SAML2\XML\ecp; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; +use SimpleSAML\SAML2\XML\ecp\AbstractEcpElement; use SimpleSAML\SAML2\XML\ecp\RelayState; use SimpleSAML\SOAP\Constants as SOAP; use SimpleSAML\XML\DOMDocumentFactory; @@ -16,10 +18,10 @@ use function strval; /** - * @covers \SimpleSAML\SAML2\XML\ecp\AbstractEcpElement - * @covers \SimpleSAML\SAML2\XML\ecp\RelayState * @package simplesamlphp/saml2 */ +#[CoversClass(RelayState::class)] +#[CoversClass(AbstractEcpElement::class)] final class RelayStateTest extends TestCase { use SchemaValidationTestTrait; diff --git a/tests/SAML2/XML/ecp/RequestAuthenticatedTest.php b/tests/SAML2/XML/ecp/RequestAuthenticatedTest.php index a53d719b9..2cac54d4d 100644 --- a/tests/SAML2/XML/ecp/RequestAuthenticatedTest.php +++ b/tests/SAML2/XML/ecp/RequestAuthenticatedTest.php @@ -4,7 +4,9 @@ namespace SimpleSAML\Test\SAML2\XML\ecp; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; +use SimpleSAML\SAML2\XML\ecp\AbstractEcpElement; use SimpleSAML\SAML2\XML\ecp\RequestAuthenticated; use SimpleSAML\SOAP\Constants as C; use SimpleSAML\XML\DOMDocumentFactory; @@ -17,9 +19,9 @@ /** * @package simplesamlphp/saml2 - * @covers \SimpleSAML\SAML2\XML\ecp\AbstractEcpElement - * @covers \SimpleSAML\SAML2\XML\ecp\RequestAuthenticated */ +#[CoversClass(RequestAuthenticated::class)] +#[CoversClass(AbstractEcpElement::class)] final class RequestAuthenticatedTest extends TestCase { use SchemaValidationTestTrait; diff --git a/tests/SAML2/XML/ecp/RequestTest.php b/tests/SAML2/XML/ecp/RequestTest.php index cfb22b0fb..87ec3f560 100644 --- a/tests/SAML2/XML/ecp/RequestTest.php +++ b/tests/SAML2/XML/ecp/RequestTest.php @@ -4,7 +4,9 @@ namespace SimpleSAML\Test\SAML2\XML\ecp; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; +use SimpleSAML\SAML2\XML\ecp\AbstractEcpElement; use SimpleSAML\SAML2\XML\ecp\Request; use SimpleSAML\SAML2\XML\saml\Issuer; use SimpleSAML\SAML2\XML\samlp\GetComplete; @@ -20,10 +22,10 @@ use function strval; /** - * @covers \SimpleSAML\SAML2\XML\ecp\AbstractEcpElement - * @covers \SimpleSAML\SAML2\XML\ecp\Request * @package simplesamlphp/saml2 */ +#[CoversClass(Request::class)] +#[CoversClass(AbstractEcpElement::class)] final class RequestTest extends TestCase { use SchemaValidationTestTrait; diff --git a/tests/SAML2/XML/ecp/ResponseTest.php b/tests/SAML2/XML/ecp/ResponseTest.php index 531ff42ed..dc7aaad4f 100644 --- a/tests/SAML2/XML/ecp/ResponseTest.php +++ b/tests/SAML2/XML/ecp/ResponseTest.php @@ -5,8 +5,10 @@ namespace SimpleSAML\Test\SAML2\XML\ecp; use DOMDocument; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use SimpleSAML\SAML2\Constants as C; +use SimpleSAML\SAML2\XML\ecp\AbstractEcpElement; use SimpleSAML\SAML2\XML\ecp\Response; use SimpleSAML\SOAP\Constants as SOAP; use SimpleSAML\XML\DOMDocumentFactory; @@ -19,10 +21,10 @@ use function strval; /** - * @covers \SimpleSAML\SAML2\XML\ecp\AbstractEcpElement - * @covers \SimpleSAML\SAML2\XML\ecp\Response * @package simplesamlphp/saml2 */ +#[CoversClass(Response::class)] +#[CoversClass(AbstractEcpElement::class)] final class ResponseTest extends TestCase { use SchemaValidationTestTrait; diff --git a/tests/SAML2/XML/ecp/SubjectConfirmationTest.php b/tests/SAML2/XML/ecp/SubjectConfirmationTest.php index 5472c8f28..4f14de273 100644 --- a/tests/SAML2/XML/ecp/SubjectConfirmationTest.php +++ b/tests/SAML2/XML/ecp/SubjectConfirmationTest.php @@ -5,7 +5,9 @@ namespace SimpleSAML\Test\SAML2\XML\ecp; use DateTimeImmutable; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; +use SimpleSAML\SAML2\XML\ecp\AbstractEcpElement; use SimpleSAML\SAML2\XML\ecp\SubjectConfirmation; use SimpleSAML\SAML2\XML\saml\SubjectConfirmationData; use SimpleSAML\SOAP\Constants as SOAP; @@ -23,10 +25,10 @@ use function strval; /** - * @covers \SimpleSAML\SAML2\XML\ecp\AbstractEcpElement - * @covers \SimpleSAML\SAML2\XML\ecp\SubjectConfirmation * @package simplesamlphp/saml2 */ +#[CoversClass(SubjectConfirmation::class)] +#[CoversClass(AbstractEcpElement::class)] final class SubjectConfirmationTest extends TestCase { use SchemaValidationTestTrait; diff --git a/tests/SAML2/XML/emd/RepublishRequestTest.php b/tests/SAML2/XML/emd/RepublishRequestTest.php index 8a9198389..31205eaee 100644 --- a/tests/SAML2/XML/emd/RepublishRequestTest.php +++ b/tests/SAML2/XML/emd/RepublishRequestTest.php @@ -4,7 +4,9 @@ namespace SimpleSAML\Test\SAML2\XML\emd; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; +use SimpleSAML\SAML2\XML\emd\AbstractEmdElement; use SimpleSAML\SAML2\XML\emd\RepublishRequest; use SimpleSAML\SAML2\XML\emd\RepublishTarget; use SimpleSAML\XML\DOMDocumentFactory; @@ -18,10 +20,10 @@ /** * Class \SimpleSAML\SAML2\XML\emd\RepublishRequest * - * @covers \SimpleSAML\SAML2\XML\emd\RepublishRequest - * @covers \SimpleSAML\SAML2\XML\emd\AbstractEmdElement * @package simplesamlphp/saml2 */ +#[CoversClass(RepublishRequest::class)] +#[CoversClass(AbstractEmdElement::class)] final class RepublishRequestTest extends TestCase { use ArrayizableElementTestTrait; diff --git a/tests/SAML2/XML/emd/RepublishTargetTest.php b/tests/SAML2/XML/emd/RepublishTargetTest.php index 18f5020b0..9c7e6dc4e 100644 --- a/tests/SAML2/XML/emd/RepublishTargetTest.php +++ b/tests/SAML2/XML/emd/RepublishTargetTest.php @@ -4,8 +4,10 @@ namespace SimpleSAML\Test\SAML2\XML\emd; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use SimpleSAML\Assert\AssertionFailedException; +use SimpleSAML\SAML2\XML\emd\AbstractEmdElement; use SimpleSAML\SAML2\XML\emd\RepublishTarget; use SimpleSAML\XML\DOMDocumentFactory; use SimpleSAML\XML\TestUtils\SerializableElementTestTrait; @@ -16,10 +18,10 @@ /** * Class \SimpleSAML\SAML2\XML\emd\RepublishTarget * - * @covers \SimpleSAML\SAML2\XML\emd\RepublishTarget - * @covers \SimpleSAML\SAML2\XML\emd\AbstractEmdElement * @package simplesamlphp/saml2 */ +#[CoversClass(RepublishTarget::class)] +#[CoversClass(AbstractEmdElement::class)] final class RepublishTargetTest extends TestCase { use SerializableElementTestTrait; diff --git a/tests/SAML2/XML/idpdisc/DiscoveryResponseTest.php b/tests/SAML2/XML/idpdisc/DiscoveryResponseTest.php index 5465a6ec5..d231c96f4 100644 --- a/tests/SAML2/XML/idpdisc/DiscoveryResponseTest.php +++ b/tests/SAML2/XML/idpdisc/DiscoveryResponseTest.php @@ -4,9 +4,12 @@ namespace SimpleSAML\Test\SAML2\XML\idpdisc; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use SimpleSAML\Assert\AssertionFailedException; use SimpleSAML\SAML2\XML\idpdisc\DiscoveryResponse; +use SimpleSAML\SAML2\XML\md\AbstractIndexedEndpointType; +use SimpleSAML\SAML2\XML\md\AbstractMdElement; use SimpleSAML\Test\SAML2\Constants as C; use SimpleSAML\XML\Attribute as XMLAttribute; use SimpleSAML\XML\Chunk; @@ -21,11 +24,11 @@ /** * Class \SAML2\XML\idpdisc\DiscoveryResponseTest * - * @covers \SimpleSAML\SAML2\XML\idpdisc\DiscoveryResponse - * @covers \SimpleSAML\SAML2\XML\md\AbstractIndexedEndpointType - * @covers \SimpleSAML\SAML2\XML\md\AbstractMdElement * @package simplesamlphp/saml2 */ +#[CoversClass(DiscoveryResponse::class)] +#[CoversClass(AbstractIndexedEndpointType::class)] +#[CoversClass(AbstractMdElement::class)] final class DiscoveryResponseTest extends TestCase { use ArrayizableElementTestTrait; diff --git a/tests/SAML2/XML/init/RequestInitiatorTest.php b/tests/SAML2/XML/init/RequestInitiatorTest.php index 97add1118..ec4b9f011 100644 --- a/tests/SAML2/XML/init/RequestInitiatorTest.php +++ b/tests/SAML2/XML/init/RequestInitiatorTest.php @@ -4,8 +4,10 @@ namespace SimpleSAML\Test\SAML2\XML\init; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use SimpleSAML\SAML2\Exception\ProtocolViolationException; +use SimpleSAML\SAML2\XML\init\AbstractInitElement; use SimpleSAML\SAML2\XML\init\RequestInitiator; use SimpleSAML\Test\SAML2\Constants as C; use SimpleSAML\XML\Attribute as XMLAttribute; @@ -20,10 +22,10 @@ /** * Class \SAML2\XML\init\RequestInitiatorTest * - * @covers \SimpleSAML\SAML2\XML\init\RequestInitiator - * * @package simplesamlphp/saml2 */ +#[CoversClass(RequestInitiator::class)] +#[CoversClass(AbstractInitElement::class)] final class RequestInitiatorTest extends TestCase { use SchemaValidationTestTrait; diff --git a/tests/SAML2/XML/md/AbstractLocalizedNameTest.php b/tests/SAML2/XML/md/AbstractLocalizedNameTest.php index c3a616589..40eb8d407 100644 --- a/tests/SAML2/XML/md/AbstractLocalizedNameTest.php +++ b/tests/SAML2/XML/md/AbstractLocalizedNameTest.php @@ -5,9 +5,12 @@ namespace SimpleSAML\Test\SAML2\XML\md; use DOMDocument; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use SimpleSAML\Assert\AssertionFailedException; use SimpleSAML\SAML2\Constants as C; +use SimpleSAML\SAML2\XML\md\AbstractLocalizedName; +use SimpleSAML\SAML2\XML\md\AbstractMdElement; use SimpleSAML\SAML2\XML\md\ServiceDescription; use SimpleSAML\XML\DOMDocumentFactory; @@ -16,11 +19,11 @@ /** * Tests for localized names. * - * @covers \SimpleSAML\SAML2\XML\md\ServiceDescription - * @covers \SimpleSAML\SAML2\XML\md\AbstractLocalizedName - * @covers \SimpleSAML\SAML2\XML\md\AbstractMdElement * @package simplesamlphp/saml2 */ +#[CoversClass(ServiceDescription::class)] +#[CoversClass(AbstractLocalizedName::class)] +#[CoversClass(AbstractMdElement::class)] final class AbstractLocalizedNameTest extends TestCase { /** @var \DOMDocument */ diff --git a/tests/SAML2/XML/md/AdditionalMetadataLocationTest.php b/tests/SAML2/XML/md/AdditionalMetadataLocationTest.php index 8e1c1bd41..f2c2e0f0b 100644 --- a/tests/SAML2/XML/md/AdditionalMetadataLocationTest.php +++ b/tests/SAML2/XML/md/AdditionalMetadataLocationTest.php @@ -4,7 +4,9 @@ namespace SimpleSAML\Test\SAML2\XML\md; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; +use SimpleSAML\SAML2\XML\md\AbstractMdElement; use SimpleSAML\SAML2\XML\md\AdditionalMetadataLocation; use SimpleSAML\Test\SAML2\Constants as C; use SimpleSAML\XML\DOMDocumentFactory; @@ -19,10 +21,10 @@ /** * Tests for the AdditionalMetadataLocation class * - * @covers \SimpleSAML\SAML2\XML\md\AbstractMdElement - * @covers \SimpleSAML\SAML2\XML\md\AdditionalMetadataLocation * @package simplesamlphp/saml2 */ +#[CoversClass(AdditionalMetadataLocation::class)] +#[CoversClass(AbstractMdElement::class)] final class AdditionalMetadataLocationTest extends TestCase { use SchemaValidationTestTrait; diff --git a/tests/SAML2/XML/md/AffiliateMemberTest.php b/tests/SAML2/XML/md/AffiliateMemberTest.php index 8bc204e02..507510b87 100644 --- a/tests/SAML2/XML/md/AffiliateMemberTest.php +++ b/tests/SAML2/XML/md/AffiliateMemberTest.php @@ -4,9 +4,11 @@ namespace SimpleSAML\Test\SAML2\XML\md; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use SimpleSAML\SAML2\Constants as C; use SimpleSAML\SAML2\Exception\ProtocolViolationException; +use SimpleSAML\SAML2\XML\md\AbstractMdElement; use SimpleSAML\SAML2\XML\md\AffiliateMember; use SimpleSAML\XML\DOMDocumentFactory; use SimpleSAML\XML\Exception\SchemaViolationException; @@ -21,10 +23,10 @@ /** * Tests for AffiliateMember. * - * @covers \SimpleSAML\SAML2\XML\md\AffiliateMember - * @covers \SimpleSAML\SAML2\XML\md\AbstractMdElement * @package simplesamlphp/saml2 */ +#[CoversClass(AffiliateMember::class)] +#[CoversClass(AbstractMdElement::class)] final class AffiliateMemberTest extends TestCase { use SchemaValidationTestTrait; diff --git a/tests/SAML2/XML/md/AffiliationDescriptorTest.php b/tests/SAML2/XML/md/AffiliationDescriptorTest.php index 1ab901a6e..7309d51ec 100644 --- a/tests/SAML2/XML/md/AffiliationDescriptorTest.php +++ b/tests/SAML2/XML/md/AffiliationDescriptorTest.php @@ -6,7 +6,11 @@ use DateTimeImmutable; use Exception; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; +use SimpleSAML\SAML2\XML\md\AbstractMdElement; +use SimpleSAML\SAML2\XML\md\AbstractMetadataDocument; +use SimpleSAML\SAML2\XML\md\AbstractSignedMdElement; use SimpleSAML\SAML2\XML\md\AffiliateMember; use SimpleSAML\SAML2\XML\md\AffiliationDescriptor; use SimpleSAML\SAML2\XML\md\KeyDescriptor; @@ -27,12 +31,12 @@ /** * Tests for the AffiliationDescriptor class. * - * @covers \SimpleSAML\SAML2\XML\md\AbstractMdElement - * @covers \SimpleSAML\SAML2\XML\md\AbstractSignedMdElement - * @covers \SimpleSAML\SAML2\XML\md\AbstractMetadataDocument - * @covers \SimpleSAML\SAML2\XML\md\AffiliationDescriptor * @package simplesamlphp/saml2 */ +#[CoversClass(AffiliateDescriptor::class)] +#[CoversClass(AbstractSignedMdElement::class)] +#[CoversClass(AbstractMetadataDocument::class)] +#[CoversClass(AbstractMdElement::class)] final class AffiliationDescriptorTest extends TestCase { use SchemaValidationTestTrait; diff --git a/tests/SAML2/XML/md/ArtifactResolutionServiceTest.php b/tests/SAML2/XML/md/ArtifactResolutionServiceTest.php index 1e04b6903..25d78277c 100644 --- a/tests/SAML2/XML/md/ArtifactResolutionServiceTest.php +++ b/tests/SAML2/XML/md/ArtifactResolutionServiceTest.php @@ -4,8 +4,11 @@ namespace SimpleSAML\Test\SAML2\XML\md; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use SimpleSAML\Assert\AssertionFailedException; +use SimpleSAML\SAML2\XML\md\AbstractIndexedEndpointType; +use SimpleSAML\SAML2\XML\md\AbstractMdElement; use SimpleSAML\SAML2\XML\md\ArtifactResolutionService; use SimpleSAML\Test\SAML2\Constants as C; use SimpleSAML\XML\Attribute as XMLAttribute; @@ -22,11 +25,11 @@ /** * Tests for md:ArtifactResolutionService. * - * @covers \SimpleSAML\SAML2\XML\md\AbstractMdElement - * @covers \SimpleSAML\SAML2\XML\md\AbstractIndexedEndpointType - * @covers \SimpleSAML\SAML2\XML\md\ArtifactResolutionService * @package simplesamlphp/saml2 */ +#[CoversClass(ArtifactResolutionService::class)] +#[CoversClass(AbstractIndexedEndpointType::class)] +#[CoversClass(AbstractMdElement::class)] final class ArtifactResolutionServiceTest extends TestCase { use ArrayizableElementTestTrait; diff --git a/tests/SAML2/XML/md/AssertionConsumerServiceTest.php b/tests/SAML2/XML/md/AssertionConsumerServiceTest.php index be73fde72..0e0f033de 100644 --- a/tests/SAML2/XML/md/AssertionConsumerServiceTest.php +++ b/tests/SAML2/XML/md/AssertionConsumerServiceTest.php @@ -4,7 +4,10 @@ namespace SimpleSAML\Test\SAML2\XML\md; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; +use SimpleSAML\SAML2\XML\md\AbstractIndexedEndpointType; +use SimpleSAML\SAML2\XML\md\AbstractMdElement; use SimpleSAML\SAML2\XML\md\AssertionConsumerService; use SimpleSAML\Test\SAML2\Constants as C; use SimpleSAML\XML\Attribute as XMLAttribute; @@ -20,11 +23,11 @@ /** * Class \SimpleSAML\SAML2\XML\md\AssertionConsumerServiceTest * - * @covers \SimpleSAML\SAML2\XML\md\AssertionConsumerService - * @covers \SimpleSAML\SAML2\XML\md\AbstractIndexedEndpointType - * @covers \SimpleSAML\SAML2\XML\md\AbstractMdElement * @package simplesamlphp/saml2 */ +#[CoversClass(AssertionConsumerService::class)] +#[CoversClass(AbstractIndexedEndpointType::class)] +#[CoversClass(AbstractMdElement::class)] final class AssertionConsumerServiceTest extends TestCase { use ArrayizableElementTestTrait; diff --git a/tests/SAML2/XML/md/AttributeAuthorityDescriptorTest.php b/tests/SAML2/XML/md/AttributeAuthorityDescriptorTest.php index b1a28723f..b02b3a464 100644 --- a/tests/SAML2/XML/md/AttributeAuthorityDescriptorTest.php +++ b/tests/SAML2/XML/md/AttributeAuthorityDescriptorTest.php @@ -5,8 +5,14 @@ namespace SimpleSAML\Test\SAML2\XML\md; use Exception; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use SimpleSAML\Assert\AssertionFailedException; +use SimpleSAML\SAML2\XML\md\AbstractMdElement; +use SimpleSAML\SAML2\XML\md\AbstractMetadataDocument; +use SimpleSAML\SAML2\XML\md\AbstractRoleDescriptor; +use SimpleSAML\SAML2\XML\md\AbstractRoleDescriptorType; +use SimpleSAML\SAML2\XML\md\AbstractSignedMdElement; use SimpleSAML\SAML2\XML\md\AssertionIDRequestService; use SimpleSAML\SAML2\XML\md\AttributeAuthorityDescriptor; use SimpleSAML\SAML2\XML\md\AttributeProfile; @@ -27,14 +33,14 @@ /** * Tests for the AttributeAuthorityDescriptor class. * - * @covers \SimpleSAML\SAML2\XML\md\AbstractMdElement - * @covers \SimpleSAML\SAML2\XML\md\AbstractSignedMdElement - * @covers \SimpleSAML\SAML2\XML\md\AbstractMetadataDocument - * @covers \SimpleSAML\SAML2\XML\md\AbstractRoleDescriptorType - * @covers \SimpleSAML\SAML2\XML\md\AbstractRoleDescriptor - * @covers \SimpleSAML\SAML2\XML\md\AttributeAuthorityDescriptor * @package simplesamlphp/saml2 */ +#[CoversClass(AttributeAuthorityDescriptor::class)] +#[CoversClass(AbstractRoleDescriptor::class)] +#[CoversClass(AbstractRoleDescriptorType::class)] +#[CoversClass(AbstractMetadataDocument::class)] +#[CoversClass(AbstractSignedMdElement::class)] +#[CoversClass(AbstractMdElement::class)] final class AttributeAuthorityDescriptorTest extends TestCase { use SchemaValidationTestTrait; diff --git a/tests/SAML2/XML/md/AttributeConsumingServiceTest.php b/tests/SAML2/XML/md/AttributeConsumingServiceTest.php index a4e7bcab6..75100a19e 100644 --- a/tests/SAML2/XML/md/AttributeConsumingServiceTest.php +++ b/tests/SAML2/XML/md/AttributeConsumingServiceTest.php @@ -4,9 +4,11 @@ namespace SimpleSAML\Test\SAML2\XML\md; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use SimpleSAML\Assert\AssertionFailedException; use SimpleSAML\SAML2\Constants as C; +use SimpleSAML\SAML2\XML\md\AbstractMdElement; use SimpleSAML\SAML2\XML\md\AttributeConsumingService; use SimpleSAML\SAML2\XML\md\RequestedAttribute; use SimpleSAML\SAML2\XML\md\ServiceDescription; @@ -24,10 +26,10 @@ /** * Tests for the AttributeConsumingService class. * - * @covers \SimpleSAML\SAML2\XML\md\AbstractMdElement - * @covers \SimpleSAML\SAML2\XML\md\AttributeConsumingService * @package simplesamlphp/saml2 */ +#[CoversClass(AttributeConsumingService::class)] +#[CoversClass(AbstractMdElement::class)] final class AttributeConsumingServiceTest extends TestCase { use SchemaValidationTestTrait; diff --git a/tests/SAML2/XML/md/AttributeProfileTest.php b/tests/SAML2/XML/md/AttributeProfileTest.php index dd813fcb1..e1f9e8ec1 100644 --- a/tests/SAML2/XML/md/AttributeProfileTest.php +++ b/tests/SAML2/XML/md/AttributeProfileTest.php @@ -4,7 +4,9 @@ namespace SimpleSAML\Test\SAML2\XML\md; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; +use SimpleSAML\SAML2\XML\md\AbstractMdElement; use SimpleSAML\SAML2\XML\md\AttributeProfile; use SimpleSAML\Test\SAML2\Constants as C; use SimpleSAML\XML\DOMDocumentFactory; @@ -17,10 +19,10 @@ /** * Class \SimpleSAML\SAML2\XML\md\AttributeProfileTest * - * @covers \SimpleSAML\SAML2\XML\md\AttributeProfile - * @covers \SimpleSAML\SAML2\XML\md\AbstractMdElement * @package simplesamlphp/saml2 */ +#[CoversClass(AttributeProfile::class)] +#[CoversClass(AbstractMdElement::class)] final class AttributeProfileTest extends TestCase { use SchemaValidationTestTrait; diff --git a/tests/SAML2/XML/md/AuthnAuthorityDescriptorTest.php b/tests/SAML2/XML/md/AuthnAuthorityDescriptorTest.php index 970e10f2a..c45b04e26 100644 --- a/tests/SAML2/XML/md/AuthnAuthorityDescriptorTest.php +++ b/tests/SAML2/XML/md/AuthnAuthorityDescriptorTest.php @@ -4,8 +4,14 @@ namespace SimpleSAML\Test\SAML2\XML\md; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use SimpleSAML\Assert\AssertionFailedException; +use SimpleSAML\SAML2\XML\md\AbstractMdElement; +use SimpleSAML\SAML2\XML\md\AbstractMetadataDocument; +use SimpleSAML\SAML2\XML\md\AbstractRoleDescriptor; +use SimpleSAML\SAML2\XML\md\AbstractRoleDescriptorType; +use SimpleSAML\SAML2\XML\md\AbstractSignedMdElement; use SimpleSAML\SAML2\XML\md\AssertionIDRequestService; use SimpleSAML\SAML2\XML\md\AuthnAuthorityDescriptor; use SimpleSAML\SAML2\XML\md\AuthnQueryService; @@ -21,14 +27,14 @@ use function strval; /** - * @covers \SimpleSAML\SAML2\XML\md\AbstractMdElement - * @covers \SimpleSAML\SAML2\XML\md\AbstractSignedMdElement - * @covers \SimpleSAML\SAML2\XML\md\AbstractMetadataDocument - * @covers \SimpleSAML\SAML2\XML\md\AbstractRoleDescriptorType - * @covers \SimpleSAML\SAML2\XML\md\AbstractRoleDescriptor - * @covers \SimpleSAML\SAML2\XML\md\AuthnAuthorityDescriptor * @package simplesamlphp/saml2 */ +#[CoversClass(AuthnAuthorityDescriptor::class)] +#[CoversClass(AbstractRoleDescriptor::class)] +#[CoversClass(AbstractRoleDescriptorType::class)] +#[CoversClass(AbstractMetadataDocument::class)] +#[CoversClass(AbstractSignedMdElement::class)] +#[CoversClass(AbstractMdElement::class)] final class AuthnAuthorityDescriptorTest extends TestCase { use SchemaValidationTestTrait; diff --git a/tests/SAML2/XML/md/CompanyTest.php b/tests/SAML2/XML/md/CompanyTest.php index 4dc6a3945..8ee9c67e2 100644 --- a/tests/SAML2/XML/md/CompanyTest.php +++ b/tests/SAML2/XML/md/CompanyTest.php @@ -4,7 +4,9 @@ namespace SimpleSAML\Test\SAML2\XML\md; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; +use SimpleSAML\SAML2\XML\md\AbstractMdElement; use SimpleSAML\SAML2\XML\md\Company; use SimpleSAML\XML\DOMDocumentFactory; use SimpleSAML\XML\TestUtils\SchemaValidationTestTrait; @@ -16,10 +18,10 @@ /** * Tests for Company. * - * @covers \SimpleSAML\SAML2\XML\md\Company - * @covers \SimpleSAML\SAML2\XML\md\AbstractMdElement * @package simplesamlphp/saml2 */ +#[CoversClass(Company::class)] +#[CoversClass(AbstractMdElement::class)] final class CompanyTest extends TestCase { use SchemaValidationTestTrait; diff --git a/tests/SAML2/XML/md/ContactPersonTest.php b/tests/SAML2/XML/md/ContactPersonTest.php index 251ff014e..6a0ae003f 100644 --- a/tests/SAML2/XML/md/ContactPersonTest.php +++ b/tests/SAML2/XML/md/ContactPersonTest.php @@ -5,9 +5,11 @@ namespace SimpleSAML\Test\SAML2\XML\md; use DOMDocument; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use SimpleSAML\Assert\AssertionFailedException; use SimpleSAML\SAML2\Constants as C; +use SimpleSAML\SAML2\XML\md\AbstractMdElement; use SimpleSAML\SAML2\XML\md\Company; use SimpleSAML\SAML2\XML\md\ContactPerson; use SimpleSAML\SAML2\XML\md\EmailAddress; @@ -29,10 +31,10 @@ /** * Tests for the ContactPerson class. * - * @covers \SimpleSAML\SAML2\XML\md\AbstractMdElement - * @covers \SimpleSAML\SAML2\XML\md\ContactPerson * @package simplesamlphp/saml2 */ +#[CoversClass(ContactPerson::class)] +#[CoversClass(AbstractMdElement::class)] final class ContactPersonTest extends TestCase { use ArrayizableElementTestTrait; diff --git a/tests/SAML2/XML/md/EmailAddressTest.php b/tests/SAML2/XML/md/EmailAddressTest.php index 289cfdbf9..c18803cb3 100644 --- a/tests/SAML2/XML/md/EmailAddressTest.php +++ b/tests/SAML2/XML/md/EmailAddressTest.php @@ -4,8 +4,10 @@ namespace SimpleSAML\Test\SAML2\XML\md; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use SimpleSAML\Assert\AssertionFailedException; +use SimpleSAML\SAML2\XML\md\AbstractMdElement; use SimpleSAML\SAML2\XML\md\EmailAddress; use SimpleSAML\XML\DOMDocumentFactory; use SimpleSAML\XML\TestUtils\ArrayizableElementTestTrait; @@ -15,10 +17,10 @@ /** * Tests for EmailAddress. * - * @covers \SimpleSAML\SAML2\XML\md\EmailAddress - * @covers \SimpleSAML\SAML2\XML\md\AbstractMdElement * @package simplesamlphp/saml2 */ +#[CoversClass(EmailAddress::class)] +#[CoversClass(AbstractMdElement::class)] final class EmailAddressTest extends TestCase { use ArrayizableElementTestTrait; diff --git a/tests/SAML2/XML/md/EncryptionMethodTest.php b/tests/SAML2/XML/md/EncryptionMethodTest.php index 1201fbb55..8548399f7 100644 --- a/tests/SAML2/XML/md/EncryptionMethodTest.php +++ b/tests/SAML2/XML/md/EncryptionMethodTest.php @@ -4,9 +4,11 @@ namespace SimpleSAML\Test\SAML2\XML\md; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use SimpleSAML\SAML2\Constants as C; use SimpleSAML\SAML2\Utils\XPath; +use SimpleSAML\SAML2\XML\md\AbstractMdElement; use SimpleSAML\SAML2\XML\md\EncryptionMethod; use SimpleSAML\XML\Chunk; use SimpleSAML\XML\DOMDocumentFactory; @@ -22,11 +24,10 @@ /** * Tests for the md:EncryptionMethod element. * - * @covers \SimpleSAML\SAML2\XML\md\AbstractMdElement - * @covers \SimpleSAML\SAML2\XML\md\EncryptionMethod - * @covers \SimpleSAML\XMLSecurity\XML\xenc\AbstractEncryptionMethod * @package simplesamlphp/saml2 */ +#[CoversClass(EncryptionMethod::class)] +#[CoversClass(AbstractMdElement::class)] final class EncryptionMethodTest extends TestCase { use SchemaValidationTestTrait; diff --git a/tests/SAML2/XML/md/EndpointTypeTest.php b/tests/SAML2/XML/md/EndpointTypeTest.php index ed7eb1255..5f2f2489d 100644 --- a/tests/SAML2/XML/md/EndpointTypeTest.php +++ b/tests/SAML2/XML/md/EndpointTypeTest.php @@ -5,7 +5,9 @@ namespace SimpleSAML\Test\SAML2\XML\md; use DOMDocument; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; +use SimpleSAML\SAML2\XML\md\AbstractMdElement; use SimpleSAML\SAML2\XML\md\AssertionIDRequestService; use SimpleSAML\SAML2\XML\md\AttributeService; use SimpleSAML\Test\SAML2\Constants as C; @@ -25,10 +27,10 @@ /** * Class \SAML2\XML\md\EndpointTypeTest * - * @covers \SimpleSAML\SAML2\XML\md\AbstractEndpointType - * @covers \SimpleSAML\SAML2\XML\md\AbstractMdElement * @package simplesamlphp/saml2 */ +#[CoversClass(AbstractEndpointType::class)] +#[CoversClass(AbstractMdElement::class)] final class EndpointTypeTest extends TestCase { use ArrayizableElementTestTrait; diff --git a/tests/SAML2/XML/md/EntitiesDescriptorTest.php b/tests/SAML2/XML/md/EntitiesDescriptorTest.php index 971983a52..73d349a78 100644 --- a/tests/SAML2/XML/md/EntitiesDescriptorTest.php +++ b/tests/SAML2/XML/md/EntitiesDescriptorTest.php @@ -5,9 +5,13 @@ namespace SimpleSAML\Test\SAML2\XML\md; use DateTimeImmutable; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use SimpleSAML\SAML2\Constants as C; use SimpleSAML\SAML2\Exception\ProtocolViolationException; +use SimpleSAML\SAML2\XML\md\AbstractMdElement; +use SimpleSAML\SAML2\XML\md\AbstractMetadataDocument; +use SimpleSAML\SAML2\XML\md\AbstractSignedMdElement; use SimpleSAML\SAML2\XML\md\EntitiesDescriptor; use SimpleSAML\SAML2\XML\md\EntityDescriptor; use SimpleSAML\SAML2\XML\md\Extensions; @@ -24,12 +28,12 @@ /** * Tests for the md:EntitiesDescriptor element. * - * @covers \SimpleSAML\SAML2\XML\md\AbstractMdElement - * @covers \SimpleSAML\SAML2\XML\md\AbstractSignedMdElement - * @covers \SimpleSAML\SAML2\XML\md\AbstractMetadataDocument - * @covers \SimpleSAML\SAML2\XML\md\EntitiesDescriptor * @package simplesamlphp/saml2 */ +#[CoversClass(EntitiesDescriptor::class)] +#[CoversClass(AbstractSignedMdElement::class)] +#[CoversClass(AbstractMetadataDocument::class)] +#[CoversClass(AbstractMdElement::class)] final class EntitiesDescriptorTest extends TestCase { use SchemaValidationTestTrait; diff --git a/tests/SAML2/XML/md/EntityDescriptorTest.php b/tests/SAML2/XML/md/EntityDescriptorTest.php index 817976217..30607764e 100644 --- a/tests/SAML2/XML/md/EntityDescriptorTest.php +++ b/tests/SAML2/XML/md/EntityDescriptorTest.php @@ -6,9 +6,13 @@ use DateTimeImmutable; use DOMText; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use SimpleSAML\Assert\AssertionFailedException; use SimpleSAML\SAML2\Exception\ProtocolViolationException; +use SimpleSAML\SAML2\XML\md\AbstractMdElement; +use SimpleSAML\SAML2\XML\md\AbstractMetadataDocument; +use SimpleSAML\SAML2\XML\md\AbstractSignedMdElement; use SimpleSAML\SAML2\XML\md\AdditionalMetadataLocation; use SimpleSAML\SAML2\XML\md\AffiliateMember; use SimpleSAML\SAML2\XML\md\AffiliationDescriptor; @@ -48,13 +52,12 @@ /** * Class \SAML2\XML\md\EntityDescriptorTest * - * @covers \SimpleSAML\SAML2\XML\md\AbstractMdElement - * @covers \SimpleSAML\SAML2\XML\md\AbstractSignedMdElement - * @covers \SimpleSAML\SAML2\XML\md\AbstractMetadataDocument - * @covers \SimpleSAML\SAML2\XML\md\EntityDescriptor - * * @package simplesamlphp/saml2 */ +#[CoversClass(EntityDescriptor::class)] +#[CoversClass(AbstractSignedMdElement::class)] +#[CoversClass(AbstractMetadataDocument::class)] +#[CoversClass(AbstractMdElement::class)] final class EntityDescriptorTest extends TestCase { use SchemaValidationTestTrait; diff --git a/tests/SAML2/XML/md/ExtensionsTest.php b/tests/SAML2/XML/md/ExtensionsTest.php index fc16311ff..960a8986f 100644 --- a/tests/SAML2/XML/md/ExtensionsTest.php +++ b/tests/SAML2/XML/md/ExtensionsTest.php @@ -4,6 +4,7 @@ namespace SimpleSAML\Test\SAML2\XML\md; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use SimpleSAML\SAML2\Constants as C; use SimpleSAML\SAML2\Exception\ProtocolViolationException; @@ -12,6 +13,7 @@ use SimpleSAML\SAML2\XML\emd\RepublishRequest; use SimpleSAML\SAML2\XML\emd\RepublishTarget; use SimpleSAML\SAML2\XML\idpdisc\DiscoveryResponse; +use SimpleSAML\SAML2\XML\md\AbstractMdElement; use SimpleSAML\SAML2\XML\md\Extensions; use SimpleSAML\SAML2\XML\mdattr\EntityAttributes; use SimpleSAML\SAML2\XML\mdrpi\Publication; @@ -37,10 +39,10 @@ * * This class tests for currently supported metadata extensions. * - * @covers \SimpleSAML\SAML2\XML\md\AbstractMdElement - * @covers \SimpleSAML\SAML2\XML\md\Extensions * @package simplesamlphp/saml2 */ +#[CoversClass(Extensions::class)] +#[CoversClass(AbstractMdElement::class)] final class ExtensionsTest extends TestCase { use SchemaValidationTestTrait; diff --git a/tests/SAML2/XML/md/GivenNameTest.php b/tests/SAML2/XML/md/GivenNameTest.php index 24552b6f1..329242260 100644 --- a/tests/SAML2/XML/md/GivenNameTest.php +++ b/tests/SAML2/XML/md/GivenNameTest.php @@ -4,7 +4,9 @@ namespace SimpleSAML\Test\SAML2\XML\md; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; +use SimpleSAML\SAML2\XML\md\AbstractMdElement; use SimpleSAML\SAML2\XML\md\GivenName; use SimpleSAML\XML\DOMDocumentFactory; use SimpleSAML\XML\TestUtils\SchemaValidationTestTrait; @@ -16,10 +18,10 @@ /** * Tests for GivenName. * - * @covers \SimpleSAML\SAML2\XML\md\GivenName - * @covers \SimpleSAML\SAML2\XML\md\AbstractMdElement * @package simplesamlphp/saml2 */ +#[CoversClass(GivenName::class)] +#[CoversClass(AbstractMdElement::class)] final class GivenNameTest extends TestCase { use SchemaValidationTestTrait; diff --git a/tests/SAML2/XML/md/IDPSSODescriptorTest.php b/tests/SAML2/XML/md/IDPSSODescriptorTest.php index a0c545ea3..7a02fc8f7 100644 --- a/tests/SAML2/XML/md/IDPSSODescriptorTest.php +++ b/tests/SAML2/XML/md/IDPSSODescriptorTest.php @@ -4,8 +4,14 @@ namespace SimpleSAML\Test\SAML2\XML\md; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use SimpleSAML\Assert\AssertionFailedException; +use SimpleSAML\SAML2\XML\md\AbstractMdElement; +use SimpleSAML\SAML2\XML\md\AbstractMetadataDocument; +use SimpleSAML\SAML2\XML\md\AbstractRoleDescriptor; +use SimpleSAML\SAML2\XML\md\AbstractRoleDescriptorType; +use SimpleSAML\SAML2\XML\md\AbstractSignedMdElement; use SimpleSAML\SAML2\XML\md\ArtifactResolutionService; use SimpleSAML\SAML2\XML\md\AssertionIDRequestService; use SimpleSAML\SAML2\XML\md\AttributeProfile; @@ -33,14 +39,14 @@ /** * Tests for IDPSSODescriptor. * - * @covers \SimpleSAML\SAML2\XML\md\IDPSSODescriptor - * @covers \SimpleSAML\SAML2\XML\md\AbstractSSODescriptor - * @covers \SimpleSAML\SAML2\XML\md\AbstractRoleDescriptorType - * @covers \SimpleSAML\SAML2\XML\md\AbstractMetadataDocument - * @covers \SimpleSAML\SAML2\XML\md\AbstractSignedMdElement - * @covers \SimpleSAML\SAML2\XML\md\AbstractMdElement * @package simplesamlphp/saml2 */ +#[CoversClass(AbstractIDPSSODescriptor::class)] +#[CoversClass(AbstractRoleDescriptor::class)] +#[CoversClass(AbstractRoleDescriptorType::class)] +#[CoversClass(AbstractMetadataDocument::class)] +#[CoversClass(AbstractSignedMdElement::class)] +#[CoversClass(AbstractMdElement::class)] final class IDPSSODescriptorTest extends TestCase { use SchemaValidationTestTrait; diff --git a/tests/SAML2/XML/md/IndexedEndpointTypeTest.php b/tests/SAML2/XML/md/IndexedEndpointTypeTest.php index 8f63fdf8b..45f9ce6de 100644 --- a/tests/SAML2/XML/md/IndexedEndpointTypeTest.php +++ b/tests/SAML2/XML/md/IndexedEndpointTypeTest.php @@ -4,9 +4,12 @@ namespace SimpleSAML\Test\SAML2\XML\md; +use PHPUnit\Framework\Attributes\CoversClass; +use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\TestCase; use SimpleSAML\Assert\AssertionFailedException; use SimpleSAML\SAML2\XML\idpdisc\DiscoveryResponse; +use SimpleSAML\SAML2\XML\md\AbstractMdElement; use SimpleSAML\SAML2\XML\md\ArtifactResolutionService; use SimpleSAML\SAML2\XML\md\AssertionConsumerService; use SimpleSAML\Test\SAML2\Constants as C; @@ -20,10 +23,10 @@ /** * Class \SimpleSAML\SAML2\XML\md\IndexedEndpointTypeTest * - * @covers \SimpleSAML\SAML2\XML\md\AbstractIndexedEndpointType - * @covers \SimpleSAML\SAML2\XML\md\AbstractMdElement * @package simplesamlphp/saml2 */ +#[CoversClass(AbstractIndexedEndpointType::class)] +#[CoversClass(AbstractMdElement::class)] final class IndexedEndpointTypeTest extends TestCase { private static string $resourcePath; @@ -44,9 +47,8 @@ public static function setUpBeforeClass(): void * Test that creating an IndexedEndpointType from scratch without specifying isDefault works. * * @param class-string $class - * - * @dataProvider classProvider */ + #[DataProvider('classProvider')] public function testMarshallingWithoutIsDefault(string $class): void { $binding = ($class === DiscoveryResponse::class) ? C::BINDING_IDPDISC : C::BINDING_HTTP_POST; @@ -63,9 +65,8 @@ public function testMarshallingWithoutIsDefault(string $class): void * * @param class-string $class * @param string $xmlRepresentation - * - * @dataProvider classProvider */ + #[DataProvider('classProvider')] public function testUnmarshallingWithNumericString(string $class, string $xmlRepresentation): void { $xmlRepresentation = DOMDocumentFactory::fromFile( @@ -101,9 +102,8 @@ public function testUnmarshallingUnexpectedEndpoint(): void * * @param class-string $class * @param string $xmlRepresentation - * - * @dataProvider classProvider */ + #[DataProvider('classProvider')] public function testUnmarshallingWithoutIndex(string $class, string $xmlRepresentation): void { $xmlRepresentation = DOMDocumentFactory::fromFile( @@ -127,9 +127,8 @@ public function testUnmarshallingWithoutIndex(string $class, string $xmlRepresen * * @param class-string $class * @param string $xmlRepresentation - * - * @dataProvider classProvider */ + #[DataProvider('classProvider')] public function testUnmarshallingWithWrongIndex(string $class, string $xmlRepresentation): void { $xmlRepresentation = DOMDocumentFactory::fromFile( @@ -153,9 +152,8 @@ public function testUnmarshallingWithWrongIndex(string $class, string $xmlRepres * * @param class-string $class * @param string $xmlRepresentation - * - * @dataProvider classProvider */ + #[DataProvider('classProvider')] public function testUnmarshallingWithoutIsDefault(string $class, string $xmlRepresentation): void { $xmlRepresentation = DOMDocumentFactory::fromFile( @@ -173,9 +171,8 @@ public function testUnmarshallingWithoutIsDefault(string $class, string $xmlRepr * * @param class-string $class * @param string $xmlRepresentation - * - * @dataProvider classProvider */ + #[DataProvider('classProvider')] public function testUnmarshallingWithWrongIsDefault(string $class, string $xmlRepresentation): void { $xmlRepresentation = DOMDocumentFactory::fromFile( diff --git a/tests/SAML2/XML/md/KeyDescriptorTest.php b/tests/SAML2/XML/md/KeyDescriptorTest.php index 89edb381b..852cfb543 100644 --- a/tests/SAML2/XML/md/KeyDescriptorTest.php +++ b/tests/SAML2/XML/md/KeyDescriptorTest.php @@ -4,8 +4,10 @@ namespace SimpleSAML\Test\SAML2\XML\md; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use SimpleSAML\Assert\AssertionFailedException; +use SimpleSAML\SAML2\XML\md\AbstractMdElement; use SimpleSAML\SAML2\XML\md\EncryptionMethod; use SimpleSAML\SAML2\XML\md\KeyDescriptor; use SimpleSAML\XML\DOMDocumentFactory; @@ -20,10 +22,10 @@ /** * A set of tests for the md:KeyDescriptor element * - * @covers \SimpleSAML\SAML2\XML\md\KeyDescriptor - * @covers \SimpleSAML\SAML2\XML\md\AbstractMdElement * @package simplesamlphp/saml2 */ +#[CoversClass(KeyDescriptor::class)] +#[CoversClass(AbstractMdElement::class)] final class KeyDescriptorTest extends TestCase { use SchemaValidationTestTrait; diff --git a/tests/SAML2/XML/md/NameIDFormatTest.php b/tests/SAML2/XML/md/NameIDFormatTest.php index bc089ba95..5f6b63d53 100644 --- a/tests/SAML2/XML/md/NameIDFormatTest.php +++ b/tests/SAML2/XML/md/NameIDFormatTest.php @@ -4,8 +4,10 @@ namespace SimpleSAML\Test\SAML2\XML\md; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use SimpleSAML\SAML2\Constants as C; +use SimpleSAML\SAML2\XML\md\AbstractMdElement; use SimpleSAML\SAML2\XML\md\NameIDFormat; use SimpleSAML\XML\DOMDocumentFactory; use SimpleSAML\XML\TestUtils\SchemaValidationTestTrait; @@ -17,10 +19,10 @@ /** * Class \SimpleSAML\SAML2\XML\md\NameIDFormatTest * - * @covers \SimpleSAML\SAML2\XML\md\NameIDFormat - * @covers \SimpleSAML\SAML2\XML\md\AbstractMdElement * @package simplesamlphp/saml2 */ +#[CoversClass(NameIDFormat::class)] +#[CoversClass(AbstractMdElement::class)] final class NameIDFormatTest extends TestCase { use SchemaValidationTestTrait; diff --git a/tests/SAML2/XML/md/NameIDMappingServiceTest.php b/tests/SAML2/XML/md/NameIDMappingServiceTest.php index c72a632a5..f70cd4a85 100644 --- a/tests/SAML2/XML/md/NameIDMappingServiceTest.php +++ b/tests/SAML2/XML/md/NameIDMappingServiceTest.php @@ -4,8 +4,10 @@ namespace SimpleSAML\Test\SAML2\XML\md; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use SimpleSAML\Assert\AssertionFailedException; +use SimpleSAML\SAML2\XML\md\AbstractMdElement; use SimpleSAML\SAML2\XML\md\NameIDMappingService; use SimpleSAML\Test\SAML2\Constants as C; use SimpleSAML\XML\DOMDocumentFactory; @@ -18,10 +20,10 @@ /** * Tests for md:NameIDMappingService. * - * @covers \SimpleSAML\SAML2\XML\md\NameIDMappingService - * @covers \SimpleSAML\SAML2\XML\md\AbstractMdElement * @package simplesamlphp/saml2 */ +#[CoversClass(NameIDMappingService::class)] +#[CoversClass(AbstractMdElement::class)] final class NameIDMappingServiceTest extends TestCase { use SchemaValidationTestTrait; diff --git a/tests/SAML2/XML/md/OrganizationDisplayNameTest.php b/tests/SAML2/XML/md/OrganizationDisplayNameTest.php index 6f7844ca2..cea4c7455 100644 --- a/tests/SAML2/XML/md/OrganizationDisplayNameTest.php +++ b/tests/SAML2/XML/md/OrganizationDisplayNameTest.php @@ -4,7 +4,9 @@ namespace SimpleSAML\Test\SAML2\XML\md; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; +use SimpleSAML\SAML2\XML\md\AbstractMdElement; use SimpleSAML\SAML2\XML\md\OrganizationDisplayName; use SimpleSAML\XML\DOMDocumentFactory; use SimpleSAML\XML\TestUtils\ArrayizableElementTestTrait; @@ -17,11 +19,11 @@ /** * Tests for localized names. * - * @covers \SimpleSAML\SAML2\XML\md\OrganizationDisplayName - * @covers \SimpleSAML\SAML2\XML\md\AbstractLocalizedName - * @covers \SimpleSAML\SAML2\XML\md\AbstractMdElement * @package simplesamlphp/saml2 */ +#[CoversClass(OrganizationDisplayName::class)] +#[CoversClass(AbstractLocalizedName::class)] +#[CoversClass(AbstractMdElement::class)] final class OrganizationDisplayNameTest extends TestCase { use ArrayizableElementTestTrait; diff --git a/tests/SAML2/XML/md/OrganizationNameTest.php b/tests/SAML2/XML/md/OrganizationNameTest.php index e3426b48c..16632745f 100644 --- a/tests/SAML2/XML/md/OrganizationNameTest.php +++ b/tests/SAML2/XML/md/OrganizationNameTest.php @@ -4,7 +4,9 @@ namespace SimpleSAML\Test\SAML2\XML\md; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; +use SimpleSAML\SAML2\XML\md\AbstractMdElement; use SimpleSAML\SAML2\XML\md\OrganizationName; use SimpleSAML\XML\DOMDocumentFactory; use SimpleSAML\XML\TestUtils\ArrayizableElementTestTrait; @@ -17,11 +19,11 @@ /** * Tests for localized names. * - * @covers \SimpleSAML\SAML2\XML\md\OrganizationName - * @covers \SimpleSAML\SAML2\XML\md\AbstractLocalizedName - * @covers \SimpleSAML\SAML2\XML\md\AbstractMdElement * @package simplesamlphp/saml2 */ +#[CoversClass(OrganizationName::class)] +#[CoversClass(AbstractLocalizedName::class)] +#[CoversClass(AbstractMdElement::class)] final class OrganizationNameTest extends TestCase { use ArrayizableElementTestTrait; diff --git a/tests/SAML2/XML/md/OrganizationTest.php b/tests/SAML2/XML/md/OrganizationTest.php index 632f3717d..3a75dc9bd 100644 --- a/tests/SAML2/XML/md/OrganizationTest.php +++ b/tests/SAML2/XML/md/OrganizationTest.php @@ -5,7 +5,9 @@ namespace SimpleSAML\Test\SAML2\XML\md; use DOMDocument; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; +use SimpleSAML\SAML2\XML\md\AbstractMdElement; use SimpleSAML\SAML2\XML\md\Extensions; use SimpleSAML\SAML2\XML\md\Organization; use SimpleSAML\SAML2\XML\md\OrganizationDisplayName; @@ -25,10 +27,10 @@ /** * Test for the Organization metadata element. * - * @covers \SimpleSAML\SAML2\XML\md\Organization - * @covers \SimpleSAML\SAML2\XML\md\AbstractMdElement * @package simplesamlphp/saml2 */ +#[CoversClass(Organization::class)] +#[CoversClass(AbstractMdElement::class)] final class OrganizationTest extends TestCase { use ArrayizableElementTestTrait; diff --git a/tests/SAML2/XML/md/OrganizationURLTest.php b/tests/SAML2/XML/md/OrganizationURLTest.php index 5e889c485..0e0c629d0 100644 --- a/tests/SAML2/XML/md/OrganizationURLTest.php +++ b/tests/SAML2/XML/md/OrganizationURLTest.php @@ -4,7 +4,9 @@ namespace SimpleSAML\Test\SAML2\XML\md; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; +use SimpleSAML\SAML2\XML\md\AbstractMdElement; use SimpleSAML\SAML2\XML\md\OrganizationURL; use SimpleSAML\XML\DOMDocumentFactory; use SimpleSAML\XML\Exception\SchemaViolationException; @@ -18,13 +20,12 @@ /** * Tests for localized names. * - * @covers \SimpleSAML\SAML2\XML\md\OrganizationURL - * @covers \SimpleSAML\SAML2\XML\md\AbstractLocalizedURI - * @covers \SimpleSAML\SAML2\XML\md\AbstractLocalizedName - * @covers \SimpleSAML\SAML2\XML\md\AbstractMdElement - * * @package simplesamlphp/saml2 */ +#[CoversClass(OrganizationURL::class)] +#[CoversClass(AbstractLocalizedURI::class)] +#[CoversClass(AbstractLocalizedName::class)] +#[CoversClass(AbstractMdElement::class)] final class OrganizationURLTest extends TestCase { use ArrayizableElementTestTrait; diff --git a/tests/SAML2/XML/md/PDPDescriptorTest.php b/tests/SAML2/XML/md/PDPDescriptorTest.php index 619c7459a..fa470dde8 100644 --- a/tests/SAML2/XML/md/PDPDescriptorTest.php +++ b/tests/SAML2/XML/md/PDPDescriptorTest.php @@ -4,9 +4,15 @@ namespace SimpleSAML\Test\SAML2\XML\md; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use SimpleSAML\Assert\AssertionFailedException; use SimpleSAML\SAML2\Constants as C; +use SimpleSAML\SAML2\XML\md\AbstractMdElement; +use SimpleSAML\SAML2\XML\md\AbstractMetadataDocument; +use SimpleSAML\SAML2\XML\md\AbstractRoleDescriptor; +use SimpleSAML\SAML2\XML\md\AbstractRoleDescriptorType; +use SimpleSAML\SAML2\XML\md\AbstractSignedMdElement; use SimpleSAML\SAML2\XML\md\AssertionIDRequestService; use SimpleSAML\SAML2\XML\md\AuthzService; use SimpleSAML\SAML2\XML\md\NameIDFormat; @@ -22,13 +28,14 @@ /** * Tests for md:PDPDescriptor * - * @covers \SimpleSAML\SAML2\XML\md\PDPDescriptor - * @covers \SimpleSAML\SAML2\XML\md\AbstractRoleDescriptorType - * @covers \SimpleSAML\SAML2\XML\md\AbstractMetadataDocument - * @covers \SimpleSAML\SAML2\XML\md\AbstractSignedMdElement - * @covers \SimpleSAML\SAML2\XML\md\AbstractMdElement * @package simplesamlphp/saml2 */ +#[CoversClass(PDPDescriptor::class)] +#[CoversClass(AbstractRoleDescriptor::class)] +#[CoversClass(AbstractRoleDescriptorType::class)] +#[CoversClass(AbstractMetadataDocument::class)] +#[CoversClass(AbstractSignedMdElement::class)] +#[CoversClass(AbstractMdElement::class)] final class PDPDescriptorTest extends TestCase { use SchemaValidationTestTrait; diff --git a/tests/SAML2/XML/md/RequestedAttributeTest.php b/tests/SAML2/XML/md/RequestedAttributeTest.php index 18bc8dc1e..bd91818c3 100644 --- a/tests/SAML2/XML/md/RequestedAttributeTest.php +++ b/tests/SAML2/XML/md/RequestedAttributeTest.php @@ -4,9 +4,11 @@ namespace SimpleSAML\Test\SAML2\XML\md; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use SimpleSAML\Assert\AssertionFailedException; use SimpleSAML\SAML2\Constants as C; +use SimpleSAML\SAML2\XML\md\AbstractMdElement; use SimpleSAML\SAML2\XML\md\RequestedAttribute; use SimpleSAML\SAML2\XML\saml\AttributeValue; use SimpleSAML\XML\DOMDocumentFactory; @@ -19,10 +21,10 @@ /** * Test for the RequestedAttribute metadata element. * - * @covers \SimpleSAML\SAML2\XML\md\RequestedAttribute - * @covers \SimpleSAML\SAML2\XML\md\AbstractMdElement * @package simplesamlphp/saml2 */ +#[CoversClass(RequestedAttribute::class)] +#[CoversClass(AbstractMdElement::class)] final class RequestedAttributeTest extends TestCase { use SchemaValidationTestTrait; diff --git a/tests/SAML2/XML/md/RoleDescriptorTest.php b/tests/SAML2/XML/md/RoleDescriptorTest.php index 0c4c3b0ec..5ad372445 100644 --- a/tests/SAML2/XML/md/RoleDescriptorTest.php +++ b/tests/SAML2/XML/md/RoleDescriptorTest.php @@ -5,10 +5,15 @@ namespace SimpleSAML\Test\SAML2\XML\md; use DateTimeImmutable; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use SimpleSAML\SAML2\Compat\AbstractContainer; use SimpleSAML\SAML2\Compat\ContainerSingleton; +use SimpleSAML\SAML2\XML\md\AbstractMdElement; +use SimpleSAML\SAML2\XML\md\AbstractMetadataDocument; use SimpleSAML\SAML2\XML\md\AbstractRoleDescriptor; +use SimpleSAML\SAML2\XML\md\AbstractRoleDescriptorType; +use SimpleSAML\SAML2\XML\md\AbstractSignedMdElement; use SimpleSAML\SAML2\XML\md\Company; use SimpleSAML\SAML2\XML\md\ContactPerson; use SimpleSAML\SAML2\XML\md\EmailAddress; @@ -41,15 +46,14 @@ /** * This is a test for the UnknownRoleDescriptor class. * - * @covers \SimpleSAML\SAML2\XML\md\UnknownRoleDescriptor - * @covers \SimpleSAML\SAML2\XML\md\AbstractRoleDescriptor - * @covers \SimpleSAML\SAML2\XML\md\AbstractRoleDescriptorType - * @covers \SimpleSAML\SAML2\XML\md\AbstractMetadataDocument - * @covers \SimpleSAML\SAML2\XML\md\AbstractSignedMdElement - * @covers \SimpleSAML\SAML2\XML\md\AbstractMdElement - * * @package simplesamlphp/saml2 */ +#[CoversClass(UnknownRoleDescriptor::class)] +#[CoversClass(AbstractRoleDescriptor::class)] +#[CoversClass(AbstractRoleDescriptorType::class)] +#[CoversClass(AbstractMetadataDocument::class)] +#[CoversClass(AbstractSignedMdElement::class)] +#[CoversClass(AbstractMdElement::class)] final class RoleDescriptorTest extends TestCase { use SchemaValidationTestTrait; diff --git a/tests/SAML2/XML/md/SPSSODescriptorTest.php b/tests/SAML2/XML/md/SPSSODescriptorTest.php index e304d951e..4ae20a650 100644 --- a/tests/SAML2/XML/md/SPSSODescriptorTest.php +++ b/tests/SAML2/XML/md/SPSSODescriptorTest.php @@ -5,8 +5,14 @@ namespace SimpleSAML\Test\SAML2\XML\md; use DateTimeImmutable; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use SimpleSAML\Assert\AssertionFailedException; +use SimpleSAML\SAML2\XML\md\AbstractMdElement; +use SimpleSAML\SAML2\XML\md\AbstractMetadataDocument; +use SimpleSAML\SAML2\XML\md\AbstractRoleDescriptor; +use SimpleSAML\SAML2\XML\md\AbstractRoleDescriptorType; +use SimpleSAML\SAML2\XML\md\AbstractSignedMdElement; use SimpleSAML\SAML2\XML\md\ArtifactResolutionService; use SimpleSAML\SAML2\XML\md\AssertionConsumerService; use SimpleSAML\SAML2\XML\md\AttributeConsumingService; @@ -41,14 +47,14 @@ /** * Tests for the md:SPSSODescriptor element. * - * @covers \SimpleSAML\SAML2\XML\md\SPSSODescriptor - * @covers \SimpleSAML\SAML2\XML\md\AbstractSSODescriptor - * @covers \SimpleSAML\SAML2\XML\md\AbstractRoleDescriptorType - * @covers \SimpleSAML\SAML2\XML\md\AbstractMetadataDocument - * @covers \SimpleSAML\SAML2\XML\md\AbstractSignedMdElement - * @covers \SimpleSAML\SAML2\XML\md\AbstractMdElement * @package simplesamlphp/saml2 */ +#[CoversClass(SPSSODescriptor::class)] +#[CoversClass(AbstractRoleDescriptor::class)] +#[CoversClass(AbstractRoleDescriptorType::class)] +#[CoversClass(AbstractMetadataDocument::class)] +#[CoversClass(AbstractSignedMdElement::class)] +#[CoversClass(AbstractMdElement::class)] final class SPSSODescriptorTest extends TestCase { use SchemaValidationTestTrait; diff --git a/tests/SAML2/XML/md/ServiceDescriptionTest.php b/tests/SAML2/XML/md/ServiceDescriptionTest.php index 0a4a099b7..af5b24c7d 100644 --- a/tests/SAML2/XML/md/ServiceDescriptionTest.php +++ b/tests/SAML2/XML/md/ServiceDescriptionTest.php @@ -4,7 +4,10 @@ namespace SimpleSAML\Test\SAML2\XML\md; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; +use SimpleSAML\SAML2\XML\md\AbstractLocalizedName; +use SimpleSAML\SAML2\XML\md\AbstractMdElement; use SimpleSAML\SAML2\XML\md\ServiceDescription; use SimpleSAML\XML\DOMDocumentFactory; use SimpleSAML\XML\TestUtils\ArrayizableElementTestTrait; @@ -17,11 +20,11 @@ /** * Tests for localized names. * - * @covers \SimpleSAML\SAML2\XML\md\ServiceDescription - * @covers \SimpleSAML\SAML2\XML\md\AbstractLocalizedName - * @covers \SimpleSAML\SAML2\XML\md\AbstractMdElement * @package simplesamlphp/saml2 */ +#[CoversClass(ServiceDescription::class)] +#[CoversClass(AbstractLocalizedName::class)] +#[CoversClass(AbstractMdElement::class)] final class ServiceDescriptionTest extends TestCase { use ArrayizableElementTestTrait; diff --git a/tests/SAML2/XML/md/ServiceNameTest.php b/tests/SAML2/XML/md/ServiceNameTest.php index 3d1ff5868..9dd7e67a5 100644 --- a/tests/SAML2/XML/md/ServiceNameTest.php +++ b/tests/SAML2/XML/md/ServiceNameTest.php @@ -4,9 +4,12 @@ namespace SimpleSAML\Test\SAML2\XML\md; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use SimpleSAML\Assert\AssertionFailedException; use SimpleSAML\SAML2\Constants as C; +use SimpleSAML\SAML2\XML\md\AbstractMdElement; +use SimpleSAML\SAML2\XML\md\AbstractLocalizedName; use SimpleSAML\SAML2\XML\md\ServiceName; use SimpleSAML\XML\DOMDocumentFactory; use SimpleSAML\XML\TestUtils\ArrayizableElementTestTrait; @@ -19,11 +22,11 @@ /** * Tests for localized names. * - * @covers \SimpleSAML\SAML2\XML\md\ServiceName - * @covers \SimpleSAML\SAML2\XML\md\AbstractLocalizedName - * @covers \SimpleSAML\SAML2\XML\md\AbstractMdElement * @package simplesamlphp/saml2 */ +#[CoversClass(ServiceName::class)] +#[CoversClass(AbstractLocalizedName::class)] +#[CoversClass(AbstractMdElement::class)] final class ServiceNameTest extends TestCase { use ArrayizableElementTestTrait; diff --git a/tests/SAML2/XML/md/SingleSignOnServiceTest.php b/tests/SAML2/XML/md/SingleSignOnServiceTest.php index 87a7903b0..7086ad0a2 100644 --- a/tests/SAML2/XML/md/SingleSignOnServiceTest.php +++ b/tests/SAML2/XML/md/SingleSignOnServiceTest.php @@ -4,8 +4,10 @@ namespace SimpleSAML\Test\SAML2\XML\md; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use SimpleSAML\Assert\AssertionFailedException; +use SimpleSAML\SAML2\XML\md\AbstractMdElement; use SimpleSAML\SAML2\XML\md\SingleSignOnService; use SimpleSAML\Test\SAML2\Constants as C; use SimpleSAML\XML\DOMDocumentFactory; @@ -18,10 +20,10 @@ /** * Tests for md:SingleSignOnService. * - * @covers \SimpleSAML\SAML2\XML\md\SingleSignOnService - * @covers \SimpleSAML\SAML2\XML\md\AbstractMdElement * @package simplesamlphp/saml2 */ +#[CoversClass(SingleSignOnService::class)] +#[CoversClass(AbstractMdElement::class)] final class SingleSignOnServiceTest extends TestCase { use SchemaValidationTestTrait; diff --git a/tests/SAML2/XML/md/SurNameTest.php b/tests/SAML2/XML/md/SurNameTest.php index cd568c93a..0e391e667 100644 --- a/tests/SAML2/XML/md/SurNameTest.php +++ b/tests/SAML2/XML/md/SurNameTest.php @@ -4,7 +4,9 @@ namespace SimpleSAML\Test\SAML2\XML\md; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; +use SimpleSAML\SAML2\XML\md\AbstractMdElement; use SimpleSAML\SAML2\XML\md\SurName; use SimpleSAML\XML\DOMDocumentFactory; use SimpleSAML\XML\TestUtils\SchemaValidationTestTrait; @@ -16,10 +18,10 @@ /** * Tests for SurName. * - * @covers \SimpleSAML\SAML2\XML\md\SurName - * @covers \SimpleSAML\SAML2\XML\md\AbstractMdElement * @package simplesamlphp/saml2 */ +#[CoversClass(SurName::class)] +#[CoversClass(AbstractMdElement::class)] final class SurNameTest extends TestCase { use SchemaValidationTestTrait; diff --git a/tests/SAML2/XML/md/TelephoneNumberTest.php b/tests/SAML2/XML/md/TelephoneNumberTest.php index b382653db..b7a3f4c1b 100644 --- a/tests/SAML2/XML/md/TelephoneNumberTest.php +++ b/tests/SAML2/XML/md/TelephoneNumberTest.php @@ -4,7 +4,9 @@ namespace SimpleSAML\Test\SAML2\XML\md; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; +use SimpleSAML\SAML2\XML\md\AbstractMdElement; use SimpleSAML\SAML2\XML\md\TelephoneNumber; use SimpleSAML\XML\DOMDocumentFactory; use SimpleSAML\XML\TestUtils\ArrayizableElementTestTrait; @@ -14,10 +16,10 @@ /** * Tests for SurName. * - * @covers \SimpleSAML\SAML2\XML\md\TelephoneNumber - * @covers \SimpleSAML\SAML2\XML\md\AbstractMdElement * @package simplesamlphp/saml2 */ +#[CoversClass(TelephoneNumber::class)] +#[CoversClass(AbstractMdElement::class)] final class TelephoneNumberTest extends TestCase { use ArrayizableElementTestTrait; diff --git a/tests/SAML2/XML/mdattr/EntityAttributesTest.php b/tests/SAML2/XML/mdattr/EntityAttributesTest.php index 1fb4092d6..7ccd25781 100644 --- a/tests/SAML2/XML/mdattr/EntityAttributesTest.php +++ b/tests/SAML2/XML/mdattr/EntityAttributesTest.php @@ -5,7 +5,9 @@ namespace SimpleSAML\Test\SAML2\XML\mdattr; use DateTimeImmutable; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; +use SimpleSAML\SAML2\XML\mdattr\AbstractMdattrElement; use SimpleSAML\SAML2\XML\mdattr\EntityAttributes; use SimpleSAML\SAML2\XML\saml\Assertion; use SimpleSAML\SAML2\XML\saml\Attribute; @@ -30,12 +32,10 @@ /** * Class \SAML2\XML\mdattr\EntityAttributesTest * - * @covers \SimpleSAML\SAML2\XML\mdattr\EntityAttributes - * @covers \SimpleSAML\SAML2\XML\mdattr\AbstractMdattrElement - * @requires PHP >= 8.1 * @package simplesamlphp/saml2 */ - +#[CoversClass(EntityAttributes::class)] +#[CoversClass(AbstractMdattrElement::class)] final class EntityAttributesTest extends TestCase { use SchemaValidationTestTrait; diff --git a/tests/SAML2/XML/mdrpi/PublicationInfoTest.php b/tests/SAML2/XML/mdrpi/PublicationInfoTest.php index 7eb49cf56..debc8028f 100644 --- a/tests/SAML2/XML/mdrpi/PublicationInfoTest.php +++ b/tests/SAML2/XML/mdrpi/PublicationInfoTest.php @@ -5,8 +5,10 @@ namespace SimpleSAML\Test\SAML2\XML\mdrpi; use DateTimeImmutable; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use SimpleSAML\SAML2\Exception\ProtocolViolationException; +use SimpleSAML\SAML2\XML\mdrpi\AbstractMdrpiElement; use SimpleSAML\SAML2\XML\mdrpi\PublicationInfo; use SimpleSAML\SAML2\XML\mdrpi\UsagePolicy; use SimpleSAML\XML\DOMDocumentFactory; @@ -21,11 +23,10 @@ /** * Class \SAML2\XML\mdrpi\PublicationInfoTest * - * @covers \SimpleSAML\SAML2\XML\mdrpi\PublicationInfo - * @covers \SimpleSAML\SAML2\XML\mdrpi\AbstractMdrpiElement - * * @package simplesamlphp/saml2 */ +#[CoversClass(PublicationInfo::class)] +#[CoversClass(AbstractMdrpiElement::class)] final class PublicationInfoTest extends TestCase { use ArrayizableElementTestTrait; diff --git a/tests/SAML2/XML/mdrpi/PublicationPathTest.php b/tests/SAML2/XML/mdrpi/PublicationPathTest.php index bab274113..cdfb3e6fa 100644 --- a/tests/SAML2/XML/mdrpi/PublicationPathTest.php +++ b/tests/SAML2/XML/mdrpi/PublicationPathTest.php @@ -5,7 +5,9 @@ namespace SimpleSAML\Test\SAML2\XML\mdrpi; use DateTimeImmutable; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; +use SimpleSAML\SAML2\XML\mdrpi\AbstractMdrpiElement; use SimpleSAML\SAML2\XML\mdrpi\Publication; use SimpleSAML\SAML2\XML\mdrpi\PublicationPath; use SimpleSAML\XML\DOMDocumentFactory; @@ -19,11 +21,10 @@ /** * Class \SAML2\XML\mdrpi\PublicationPathTest * - * @covers \SimpleSAML\SAML2\XML\mdrpi\PublicationPath - * @covers \SimpleSAML\SAML2\XML\mdrpi\AbstractMdrpiElement - * * @package simplesamlphp/saml2 */ +#[CoversClass(PublicationPath::class)] +#[CoversClass(AbstractMdrpiElement::class)] final class PublicationPathTest extends TestCase { use ArrayizableElementTestTrait; diff --git a/tests/SAML2/XML/mdrpi/PublicationTest.php b/tests/SAML2/XML/mdrpi/PublicationTest.php index 7e9af3bd6..6f954edc1 100644 --- a/tests/SAML2/XML/mdrpi/PublicationTest.php +++ b/tests/SAML2/XML/mdrpi/PublicationTest.php @@ -5,8 +5,10 @@ namespace SimpleSAML\Test\SAML2\XML\mdrpi; use DateTimeImmutable; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use SimpleSAML\SAML2\Exception\ProtocolViolationException; +use SimpleSAML\SAML2\XML\mdrpi\AbstractMdrpiElement; use SimpleSAML\SAML2\XML\mdrpi\Publication; use SimpleSAML\XML\DOMDocumentFactory; use SimpleSAML\XML\Exception\MissingAttributeException; @@ -20,11 +22,10 @@ /** * Class \SAML2\XML\mdrpi\PublicationTest * - * @covers \SimpleSAML\SAML2\XML\mdrpi\Publication - * @covers \SimpleSAML\SAML2\XML\mdrpi\AbstractMdrpiElement - * * @package simplesamlphp/saml2 */ +#[CoversClass(Publication::class)] +#[CoversClass(AbstractMdrpiElement::class)] final class PublicationTest extends TestCase { use ArrayizableElementTestTrait; diff --git a/tests/SAML2/XML/mdrpi/RegistrationInfoTest.php b/tests/SAML2/XML/mdrpi/RegistrationInfoTest.php index 2c4a0218e..a11eda70f 100644 --- a/tests/SAML2/XML/mdrpi/RegistrationInfoTest.php +++ b/tests/SAML2/XML/mdrpi/RegistrationInfoTest.php @@ -5,8 +5,10 @@ namespace SimpleSAML\Test\SAML2\XML\mdrpi; use DateTimeImmutable; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use SimpleSAML\SAML2\Exception\ProtocolViolationException; +use SimpleSAML\SAML2\XML\mdrpi\AbstractMdrpiElement; use SimpleSAML\SAML2\XML\mdrpi\RegistrationInfo; use SimpleSAML\SAML2\XML\mdrpi\RegistrationPolicy; use SimpleSAML\XML\DOMDocumentFactory; @@ -21,11 +23,10 @@ /** * Class \SAML2\XML\mdrpi\RegistrationInfoTest * - * @covers \SimpleSAML\SAML2\XML\mdrpi\RegistrationInfo - * @covers \SimpleSAML\SAML2\XML\mdrpi\AbstractMdrpiElement - * * @package simplesamlphp/saml2 */ +#[CoversClass(RegistrationInfo::class)] +#[CoversClass(AbstractMdrpiElement::class)] final class RegistrationInfoTest extends TestCase { use ArrayizableElementTestTrait; diff --git a/tests/SAML2/XML/mdrpi/RegistrationPolicyTest.php b/tests/SAML2/XML/mdrpi/RegistrationPolicyTest.php index f0247af75..908e55389 100644 --- a/tests/SAML2/XML/mdrpi/RegistrationPolicyTest.php +++ b/tests/SAML2/XML/mdrpi/RegistrationPolicyTest.php @@ -4,7 +4,11 @@ namespace SimpleSAML\Test\SAML2\XML\mdrpi; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; +use SimpleSAML\SAML2\XML\md\AbstractLocalizedName; +use SimpleSAML\SAML2\XML\md\AbstractLocalizedURI; +use SimpleSAML\SAML2\XML\mdrpi\AbstractMdrpiElement; use SimpleSAML\SAML2\XML\mdrpi\RegistrationPolicy; use SimpleSAML\XML\DOMDocumentFactory; use SimpleSAML\XML\Exception\SchemaViolationException; @@ -18,13 +22,12 @@ /** * Tests for localized names. * - * @covers \SimpleSAML\SAML2\XML\mdrpi\RegistrationPolicy - * @covers \SimpleSAML\SAML2\XML\md\AbstractLocalizedURI - * @covers \SimpleSAML\SAML2\XML\md\AbstractLocalizedName - * @covers \SimpleSAML\SAML2\XML\md\AbstractMdElement - * * @package simplesamlphp/saml2 */ +#[CoversClass(RegistrationPolicy::class)] +#[CoversClass(AbstractLocalizedName::class)] +#[CoversClass(AbstractLocalizedURI::class)] +#[CoversClass(AbstractMdrpiElement::class)] final class RegistrationPolicyTest extends TestCase { use ArrayizableElementTestTrait; diff --git a/tests/SAML2/XML/mdrpi/UsagePolicyTest.php b/tests/SAML2/XML/mdrpi/UsagePolicyTest.php index cff66d6b7..a8d5e092e 100644 --- a/tests/SAML2/XML/mdrpi/UsagePolicyTest.php +++ b/tests/SAML2/XML/mdrpi/UsagePolicyTest.php @@ -4,7 +4,11 @@ namespace SimpleSAML\Test\SAML2\XML\mdrpi; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; +use SimpleSAML\SAML2\XML\md\AbstractLocalizedName; +use SimpleSAML\SAML2\XML\md\AbstractLocalizedURI; +use SimpleSAML\SAML2\XML\mdrpi\AbstractMdrpiElement; use SimpleSAML\SAML2\XML\mdrpi\UsagePolicy; use SimpleSAML\XML\DOMDocumentFactory; use SimpleSAML\XML\Exception\SchemaViolationException; @@ -18,13 +22,12 @@ /** * Tests for localized names. * - * @covers \SimpleSAML\SAML2\XML\mdrpi\UsagePolicy - * @covers \SimpleSAML\SAML2\XML\md\AbstractLocalizedURI - * @covers \SimpleSAML\SAML2\XML\md\AbstractLocalizedName - * @covers \SimpleSAML\SAML2\XML\md\AbstractMdElement - * * @package simplesamlphp/saml2 */ +#[CoversClass(UsagePolicy::class)] +#[CoversClass(AbstractLocalizedName::class)] +#[CoversClass(AbstractLocalizedURI::class)] +#[CoversClass(AbstractMdrpiElement::class)] final class UsagePolicyTest extends TestCase { use ArrayizableElementTestTrait; diff --git a/tests/SAML2/XML/mdui/DescriptionTest.php b/tests/SAML2/XML/mdui/DescriptionTest.php index 664091ee9..90f019c8a 100644 --- a/tests/SAML2/XML/mdui/DescriptionTest.php +++ b/tests/SAML2/XML/mdui/DescriptionTest.php @@ -4,6 +4,7 @@ namespace SimpleSAML\Test\SAML2\XML\mdui; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use SimpleSAML\SAML2\XML\mdui\Description; use SimpleSAML\XML\DOMDocumentFactory; diff --git a/tests/SAML2/XML/mdui/DiscoHintsTest.php b/tests/SAML2/XML/mdui/DiscoHintsTest.php index 824bf1726..e37b08a2d 100644 --- a/tests/SAML2/XML/mdui/DiscoHintsTest.php +++ b/tests/SAML2/XML/mdui/DiscoHintsTest.php @@ -4,6 +4,7 @@ namespace SimpleSAML\Test\SAML2\XML\mdui; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use SimpleSAML\SAML2\Utils\XPath; use SimpleSAML\SAML2\XML\mdui\DiscoHints; diff --git a/tests/SAML2/XML/mdui/DisplayNameTest.php b/tests/SAML2/XML/mdui/DisplayNameTest.php index 3d91dbdbe..a1b3f5bd9 100644 --- a/tests/SAML2/XML/mdui/DisplayNameTest.php +++ b/tests/SAML2/XML/mdui/DisplayNameTest.php @@ -4,6 +4,7 @@ namespace SimpleSAML\Test\SAML2\XML\mdui; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use SimpleSAML\SAML2\XML\mdui\DisplayName; use SimpleSAML\XML\DOMDocumentFactory; diff --git a/tests/SAML2/XML/mdui/DomainHintTest.php b/tests/SAML2/XML/mdui/DomainHintTest.php index a1714567d..6af23e5e1 100644 --- a/tests/SAML2/XML/mdui/DomainHintTest.php +++ b/tests/SAML2/XML/mdui/DomainHintTest.php @@ -4,6 +4,7 @@ namespace SimpleSAML\Test\SAML2\XML\mdui; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use SimpleSAML\SAML2\Exception\InvalidArgumentException; use SimpleSAML\SAML2\XML\mdui\DomainHint; diff --git a/tests/SAML2/XML/mdui/GeolocationHintTest.php b/tests/SAML2/XML/mdui/GeolocationHintTest.php index 43276c500..9f317cbfa 100644 --- a/tests/SAML2/XML/mdui/GeolocationHintTest.php +++ b/tests/SAML2/XML/mdui/GeolocationHintTest.php @@ -4,6 +4,7 @@ namespace SimpleSAML\Test\SAML2\XML\mdui; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use SimpleSAML\SAML2\XML\mdui\GeolocationHint; use SimpleSAML\XML\DOMDocumentFactory; diff --git a/tests/SAML2/XML/mdui/IPHintTest.php b/tests/SAML2/XML/mdui/IPHintTest.php index 2853356c3..2725c2956 100644 --- a/tests/SAML2/XML/mdui/IPHintTest.php +++ b/tests/SAML2/XML/mdui/IPHintTest.php @@ -4,6 +4,7 @@ namespace SimpleSAML\Test\SAML2\XML\mdui; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use SimpleSAML\SAML2\XML\mdui\IPHint; use SimpleSAML\XML\DOMDocumentFactory; diff --git a/tests/SAML2/XML/mdui/InformationURLTest.php b/tests/SAML2/XML/mdui/InformationURLTest.php index c0db2faaa..3ab02a0ac 100644 --- a/tests/SAML2/XML/mdui/InformationURLTest.php +++ b/tests/SAML2/XML/mdui/InformationURLTest.php @@ -4,6 +4,7 @@ namespace SimpleSAML\Test\SAML2\XML\mdui; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use SimpleSAML\SAML2\XML\mdui\InformationURL; use SimpleSAML\XML\DOMDocumentFactory; diff --git a/tests/SAML2/XML/mdui/KeywordsTest.php b/tests/SAML2/XML/mdui/KeywordsTest.php index 6aa0acb96..280f6fd2a 100644 --- a/tests/SAML2/XML/mdui/KeywordsTest.php +++ b/tests/SAML2/XML/mdui/KeywordsTest.php @@ -4,6 +4,7 @@ namespace SimpleSAML\Test\SAML2\XML\mdui; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use SimpleSAML\Assert\AssertionFailedException; use SimpleSAML\SAML2\XML\mdui\Keywords; diff --git a/tests/SAML2/XML/mdui/LogoTest.php b/tests/SAML2/XML/mdui/LogoTest.php index bc0f03c82..8071736e7 100644 --- a/tests/SAML2/XML/mdui/LogoTest.php +++ b/tests/SAML2/XML/mdui/LogoTest.php @@ -5,6 +5,7 @@ namespace SimpleSAML\Test\SAML2\XML\mdui; use InvalidArgumentException; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use SimpleSAML\Assert\AssertionFailedException; use SimpleSAML\SAML2\XML\mdui\Logo; diff --git a/tests/SAML2/XML/mdui/PrivacyStatementURLTest.php b/tests/SAML2/XML/mdui/PrivacyStatementURLTest.php index 0c431cbe6..047b4f9fb 100644 --- a/tests/SAML2/XML/mdui/PrivacyStatementURLTest.php +++ b/tests/SAML2/XML/mdui/PrivacyStatementURLTest.php @@ -4,6 +4,7 @@ namespace SimpleSAML\Test\SAML2\XML\mdui; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use SimpleSAML\SAML2\XML\mdui\PrivacyStatementURL; use SimpleSAML\XML\DOMDocumentFactory; diff --git a/tests/SAML2/XML/mdui/UIInfoTest.php b/tests/SAML2/XML/mdui/UIInfoTest.php index 10e02109a..7351967aa 100644 --- a/tests/SAML2/XML/mdui/UIInfoTest.php +++ b/tests/SAML2/XML/mdui/UIInfoTest.php @@ -4,6 +4,7 @@ namespace SimpleSAML\Test\SAML2\XML\mdui; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use SimpleSAML\SAML2\Exception\ProtocolViolationException; use SimpleSAML\SAML2\Utils\XPath; diff --git a/tests/SAML2/XML/saml/ActionTest.php b/tests/SAML2/XML/saml/ActionTest.php index 89e8180d9..b74967b8e 100644 --- a/tests/SAML2/XML/saml/ActionTest.php +++ b/tests/SAML2/XML/saml/ActionTest.php @@ -4,7 +4,9 @@ namespace SimpleSAML\Test\SAML2\XML\saml; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; +use SimpleSAML\SAML2\XML\saml\AbstractSamlElement; use SimpleSAML\SAML2\XML\saml\Action; use SimpleSAML\Test\SAML2\Constants as C; use SimpleSAML\XML\DOMDocumentFactory; @@ -16,10 +18,10 @@ /** * Class \SAML2\XML\saml\ActionTest * - * @covers \SimpleSAML\SAML2\XML\saml\Action - * @covers \SimpleSAML\SAML2\XML\saml\AbstractSamlElement * @package simplesamlphp/saml2 */ +#[CoversClass(Action::class)] +#[CoversClass(AbstractSamlElement::class)] final class ActionTest extends TestCase { use SerializableElementTestTrait; diff --git a/tests/SAML2/XML/saml/AdviceTest.php b/tests/SAML2/XML/saml/AdviceTest.php index 74641d15b..620c0ef72 100644 --- a/tests/SAML2/XML/saml/AdviceTest.php +++ b/tests/SAML2/XML/saml/AdviceTest.php @@ -5,7 +5,9 @@ namespace SimpleSAML\SAML2\Test\SAML2\XML\saml; use DOMDocument; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; +use SimpleSAML\SAML2\XML\saml\AbstractSamlElement; use SimpleSAML\SAML2\XML\saml\Advice; use SimpleSAML\SAML2\XML\saml\Assertion; use SimpleSAML\SAML2\XML\saml\AssertionIDRef; @@ -22,11 +24,10 @@ /** * Class \SimpleSAML\SAML2\XML\saml\AdviceTest * - * @covers \SimpleSAML\SAML2\XML\saml\Advice - * @covers \SimpleSAML\SAML2\XML\saml\AbstractSamlElement - * * @package simplesamlphp/saml2 */ +#[CoversClass(Advice::class)] +#[CoversClass(AbstractSamlElement::class)] final class AdviceTest extends TestCase { use SchemaValidationTestTrait; diff --git a/tests/SAML2/XML/saml/AssertionIDRefTest.php b/tests/SAML2/XML/saml/AssertionIDRefTest.php index 5104e37bb..53f2b232e 100644 --- a/tests/SAML2/XML/saml/AssertionIDRefTest.php +++ b/tests/SAML2/XML/saml/AssertionIDRefTest.php @@ -4,7 +4,9 @@ namespace SimpleSAML\SAML2\Test\SAML2\XML\saml; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; +use SimpleSAML\SAML2\XML\saml\AbstractSamlElement; use SimpleSAML\SAML2\XML\saml\AssertionIDRef; use SimpleSAML\XML\DOMDocumentFactory; use SimpleSAML\XML\TestUtils\SchemaValidationTestTrait; @@ -16,11 +18,10 @@ /** * Class \SimpleSAML\SAML2\XML\saml\AssertionIDRefTest * - * @covers \SimpleSAML\SAML2\XML\saml\AssertionIDRef - * @covers \SimpleSAML\SAML2\XML\saml\AbstractSamlElement - * * @package simplesamlphp/saml2 */ +#[CoversClass(AssertionIDRef::class)] +#[CoversClass(AbstractSamlElement::class)] final class AssertionIDRefTest extends TestCase { use SchemaValidationTestTrait; diff --git a/tests/SAML2/XML/saml/AssertionTest.php b/tests/SAML2/XML/saml/AssertionTest.php index 5acc906a4..539097383 100644 --- a/tests/SAML2/XML/saml/AssertionTest.php +++ b/tests/SAML2/XML/saml/AssertionTest.php @@ -6,12 +6,14 @@ use DateTimeImmutable; use Exception; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use Psr\Clock\ClockInterface; use SimpleSAML\SAML2\Compat\AbstractContainer; use SimpleSAML\SAML2\Compat\ContainerSingleton; use SimpleSAML\SAML2\Utils; use SimpleSAML\SAML2\Utils\XPath; +use SimpleSAML\SAML2\XML\saml\AbstractSamlElement; use SimpleSAML\SAML2\XML\saml\Assertion; use SimpleSAML\SAML2\XML\saml\Attribute; use SimpleSAML\SAML2\XML\saml\AttributeStatement; @@ -51,10 +53,10 @@ /** * Class \SimpleSAML\SAML2\AssertionTest * - * @covers \SimpleSAML\SAML2\XML\saml\Assertion - * @covers \SimpleSAML\SAML2\XML\saml\AbstractSamlElement * @package simplesamlphp/saml2 */ +#[CoversClass(Assertion::class)] +#[CoversClass(AbstractSamlElement::class)] final class AssertionTest extends TestCase { use SchemaValidationTestTrait; diff --git a/tests/SAML2/XML/saml/AssertionURIRefTest.php b/tests/SAML2/XML/saml/AssertionURIRefTest.php index 46b225a23..27ebc61a9 100644 --- a/tests/SAML2/XML/saml/AssertionURIRefTest.php +++ b/tests/SAML2/XML/saml/AssertionURIRefTest.php @@ -4,7 +4,9 @@ namespace SimpleSAML\SAML2\Test\SAML2\XML\saml; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; +use SimpleSAML\SAML2\XML\saml\AbstractSamlElement; use SimpleSAML\SAML2\XML\saml\AssertionURIRef; use SimpleSAML\XML\DOMDocumentFactory; use SimpleSAML\XML\TestUtils\SchemaValidationTestTrait; @@ -16,11 +18,10 @@ /** * Class \SimpleSAML\SAML2\XML\saml\AssertionURIRefTest * - * @covers \SimpleSAML\SAML2\XML\saml\AssertionURIRef - * @covers \SimpleSAML\SAML2\XML\saml\AbstractSamlElement - * * @package simplesamlphp/saml2 */ +#[CoversClass(AssertionURIRef::class)] +#[CoversClass(AbstractSamlElement::class)] final class AssertionURIRefTest extends TestCase { use SchemaValidationTestTrait; diff --git a/tests/SAML2/XML/saml/AttributeStatementTest.php b/tests/SAML2/XML/saml/AttributeStatementTest.php index 9c879066e..f43e5025a 100644 --- a/tests/SAML2/XML/saml/AttributeStatementTest.php +++ b/tests/SAML2/XML/saml/AttributeStatementTest.php @@ -4,8 +4,10 @@ namespace SimpleSAML\Test\SAML2\XML\saml; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use SimpleSAML\Assert\AssertionFailedException; +use SimpleSAML\SAML2\XML\saml\AbstractSamlElement; use SimpleSAML\SAML2\XML\saml\Attribute; use SimpleSAML\SAML2\XML\saml\AttributeStatement; use SimpleSAML\SAML2\XML\saml\AttributeValue; @@ -19,10 +21,10 @@ /** * Class \SAML2\XML\saml\AttributeStatementTest * - * @covers \SimpleSAML\SAML2\XML\saml\AttributeStatement - * @covers \SimpleSAML\SAML2\XML\saml\AbstractSamlElement * @package simplesamlphp/saml2 */ +#[CoversClass(AttributeStatement::class)] +#[CoversClass(AbstractSamlElement::class)] final class AttributeStatementTest extends TestCase { use SchemaValidationTestTrait; diff --git a/tests/SAML2/XML/saml/AttributeTest.php b/tests/SAML2/XML/saml/AttributeTest.php index 7657a20db..5842d3f34 100644 --- a/tests/SAML2/XML/saml/AttributeTest.php +++ b/tests/SAML2/XML/saml/AttributeTest.php @@ -4,10 +4,12 @@ namespace SimpleSAML\Test\SAML2\XML\saml; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use SimpleSAML\SAML2\Compat\AbstractContainer; use SimpleSAML\SAML2\Compat\ContainerSingleton; use SimpleSAML\SAML2\Constants as C; +use SimpleSAML\SAML2\XML\saml\AbstractSamlElement; use SimpleSAML\SAML2\XML\saml\Attribute; use SimpleSAML\SAML2\XML\saml\AttributeValue; use SimpleSAML\SAML2\XML\saml\EncryptedAttribute; @@ -25,10 +27,10 @@ /** * Class \SAML2\XML\saml\AttributeTest * - * @covers \SimpleSAML\SAML2\XML\saml\Attribute - * @covers \SimpleSAML\SAML2\XML\saml\AbstractSamlElement * @package simplesamlphp/saml2 */ +#[CoversClass(Attribute::class)] +#[CoversClass(AbstractSamlElement::class)] final class AttributeTest extends TestCase { use SchemaValidationTestTrait; diff --git a/tests/SAML2/XML/saml/AttributeValueTest.php b/tests/SAML2/XML/saml/AttributeValueTest.php index e4eef23ee..a4503c053 100644 --- a/tests/SAML2/XML/saml/AttributeValueTest.php +++ b/tests/SAML2/XML/saml/AttributeValueTest.php @@ -4,8 +4,10 @@ namespace SimpleSAML\Test\SAML2\XML\saml; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use SimpleSAML\SAML2\Constants as C; +use SimpleSAML\SAML2\XML\saml\AbstractSamlElement; use SimpleSAML\SAML2\XML\saml\AttributeValue; use SimpleSAML\SAML2\XML\saml\NameID; use SimpleSAML\XML\DOMDocumentFactory; @@ -18,10 +20,10 @@ /** * Tests for AttributeValue elements. * - * @covers \SimpleSAML\SAML2\XML\saml\AttributeValue - * @covers \SimpleSAML\SAML2\XML\saml\AbstractSamlElement * @package simplesamlphp/saml2 */ +#[CoversClass(AttributeValue::class)] +#[CoversClass(AbstractSamlElement::class)] final class AttributeValueTest extends TestCase { use SchemaValidationTestTrait; diff --git a/tests/SAML2/XML/saml/AudienceRestrictionTest.php b/tests/SAML2/XML/saml/AudienceRestrictionTest.php index da18711fa..deea8fa7e 100644 --- a/tests/SAML2/XML/saml/AudienceRestrictionTest.php +++ b/tests/SAML2/XML/saml/AudienceRestrictionTest.php @@ -4,7 +4,9 @@ namespace SimpleSAML\Test\SAML2\XML\saml; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; +use SimpleSAML\SAML2\XML\saml\AbstractSamlElement; use SimpleSAML\SAML2\XML\saml\Audience; use SimpleSAML\SAML2\XML\saml\AudienceRestriction; use SimpleSAML\XML\DOMDocumentFactory; @@ -17,11 +19,10 @@ /** * Class \SAML2\XML\saml\AudienceRestrictionTest * - * @covers \SimpleSAML\SAML2\XML\saml\AudienceRestriction - * @covers \SimpleSAML\SAML2\XML\saml\AbstractSamlElement - * * @package simplesamlphp/saml2 */ +#[CoversClass(AudienceRestriction::class)] +#[CoversClass(AbstractSamlElement::class)] final class AudienceRestrictionTest extends TestCase { use SchemaValidationTestTrait; diff --git a/tests/SAML2/XML/saml/AudienceTest.php b/tests/SAML2/XML/saml/AudienceTest.php index e85d5ffe5..50aa6001e 100644 --- a/tests/SAML2/XML/saml/AudienceTest.php +++ b/tests/SAML2/XML/saml/AudienceTest.php @@ -4,7 +4,10 @@ namespace SimpleSAML\SAML2\Test\SAML2\XML\saml; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; +use SimpleSAML\SAML2\XML\saml\AbstractConditionType; +use SimpleSAML\SAML2\XML\saml\AbstractSamlElement; use SimpleSAML\SAML2\XML\saml\Audience; use SimpleSAML\XML\DOMDocumentFactory; use SimpleSAML\XML\TestUtils\SchemaValidationTestTrait; @@ -16,12 +19,11 @@ /** * Class \SimpleSAML\SAML2\XML\saml\AudienceTest * - * @covers \SimpleSAML\SAML2\XML\saml\Audience - * @covers \SimpleSAML\SAML2\XML\saml\AbstractConditionType - * @covers \SimpleSAML\SAML2\XML\saml\AbstractSamlElement - * * @package simplesamlphp/saml2 */ +#[CoversClass(Audience::class)] +#[CoversClass(AbstractConditionType::class)] +#[CoversClass(AbstractSamlElement::class)] final class AudienceTest extends TestCase { use SchemaValidationTestTrait; diff --git a/tests/SAML2/XML/saml/AuthenticatingAuthorityTest.php b/tests/SAML2/XML/saml/AuthenticatingAuthorityTest.php index 69820ebf7..abd99080b 100644 --- a/tests/SAML2/XML/saml/AuthenticatingAuthorityTest.php +++ b/tests/SAML2/XML/saml/AuthenticatingAuthorityTest.php @@ -4,7 +4,9 @@ namespace SimpleSAML\SAML2\Test\SAML2\XML\saml; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; +use SimpleSAML\SAML2\XML\saml\AbstractSamlElement; use SimpleSAML\SAML2\XML\saml\AuthenticatingAuthority; use SimpleSAML\XML\DOMDocumentFactory; use SimpleSAML\XML\TestUtils\SchemaValidationTestTrait; @@ -16,11 +18,10 @@ /** * Class \SimpleSAML\SAML2\XML\saml\AuthenticatingAuthorityTest * - * @covers \SimpleSAML\SAML2\XML\saml\AuthenticatingAuthority - * @covers \SimpleSAML\SAML2\XML\saml\AbstractSamlElement - * * @package simplesamlphp/saml2 */ +#[CoversClass(AuthenticationAuthority::class)] +#[CoversClass(AbstractSamlElement::class)] final class AuthenticatingAuthorityTest extends TestCase { use SchemaValidationTestTrait; diff --git a/tests/SAML2/XML/saml/AuthnContextClassRefTest.php b/tests/SAML2/XML/saml/AuthnContextClassRefTest.php index 0aa88cd3c..421f27ab7 100644 --- a/tests/SAML2/XML/saml/AuthnContextClassRefTest.php +++ b/tests/SAML2/XML/saml/AuthnContextClassRefTest.php @@ -4,8 +4,10 @@ namespace SimpleSAML\Test\SAML2\XML\saml; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use SimpleSAML\SAML2\Constants as C; +use SimpleSAML\SAML2\XML\saml\AbstractSamlElement; use SimpleSAML\SAML2\XML\saml\AuthnContextClassRef; use SimpleSAML\XML\DOMDocumentFactory; use SimpleSAML\XML\TestUtils\SchemaValidationTestTrait; @@ -17,10 +19,10 @@ /** * Class \SAML2\XML\saml\AuthnContextClassRefTest * - * @covers \SimpleSAML\SAML2\XML\saml\AuthnContextClassRef - * @covers \SimpleSAML\SAML2\XML\saml\AbstractSamlElement * @package simplesamlphp/saml2 */ +#[CoversClass(AuthnContextClassRef::class)] +#[CoversClass(AbstractSamlElement::class)] final class AuthnContextClassRefTest extends TestCase { use SchemaValidationTestTrait; diff --git a/tests/SAML2/XML/saml/AuthnContextDeclRefTest.php b/tests/SAML2/XML/saml/AuthnContextDeclRefTest.php index 763eb6403..a4dea6a97 100644 --- a/tests/SAML2/XML/saml/AuthnContextDeclRefTest.php +++ b/tests/SAML2/XML/saml/AuthnContextDeclRefTest.php @@ -4,7 +4,9 @@ namespace SimpleSAML\Test\SAML2\XML\saml; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; +use SimpleSAML\SAML2\XML\saml\AbstractSamlElement; use SimpleSAML\SAML2\XML\saml\AuthnContextDeclRef; use SimpleSAML\XML\DOMDocumentFactory; use SimpleSAML\XML\TestUtils\SchemaValidationTestTrait; @@ -16,10 +18,10 @@ /** * Class \SAML2\XML\saml\AuthnContextDeclRefTest * - * @covers \SimpleSAML\SAML2\XML\saml\AuthnContextDeclRef - * @covers \SimpleSAML\SAML2\XML\saml\AbstractSamlElement * @package simplesamlphp/saml2 */ +#[CoversClass(AuthnContextDeclRef::class)] +#[CoversClass(AbstractSamlElement::class)] final class AuthnContextDeclRefTest extends TestCase { use SchemaValidationTestTrait; diff --git a/tests/SAML2/XML/saml/AuthnContextDeclTest.php b/tests/SAML2/XML/saml/AuthnContextDeclTest.php index 3b9b9da04..d339f52bc 100644 --- a/tests/SAML2/XML/saml/AuthnContextDeclTest.php +++ b/tests/SAML2/XML/saml/AuthnContextDeclTest.php @@ -4,7 +4,9 @@ namespace SimpleSAML\Test\SAML2\XML\saml; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; +use SimpleSAML\SAML2\XML\saml\AbstractSamlElement; use SimpleSAML\SAML2\XML\saml\AuthnContextDecl; use SimpleSAML\XML\Attribute as XMLAttribute; use SimpleSAML\XML\Chunk; @@ -18,10 +20,10 @@ /** * Class \SAML2\XML\saml\AuthnContextDeclTest * - * @covers \SimpleSAML\SAML2\XML\saml\AuthnContextDecl - * @covers \SimpleSAML\SAML2\XML\saml\AbstractSamlElement * @package simplesamlphp/saml2 */ +#[CoversClass(AuthnContextDecl::class)] +#[CoversClass(AbstractSamlElement::class)] final class AuthnContextDeclTest extends TestCase { use SchemaValidationTestTrait; diff --git a/tests/SAML2/XML/saml/AuthnContextTest.php b/tests/SAML2/XML/saml/AuthnContextTest.php index 463559a0e..ce11e1806 100644 --- a/tests/SAML2/XML/saml/AuthnContextTest.php +++ b/tests/SAML2/XML/saml/AuthnContextTest.php @@ -5,9 +5,11 @@ namespace SimpleSAML\Test\SAML2\XML\saml; use DOMDocument; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use SimpleSAML\Assert\AssertionFailedException; use SimpleSAML\SAML2\Constants as C; +use SimpleSAML\SAML2\XML\saml\AbstractSamlElement; use SimpleSAML\SAML2\XML\saml\AuthenticatingAuthority; use SimpleSAML\SAML2\XML\saml\AuthnContext; use SimpleSAML\SAML2\XML\saml\AuthnContextClassRef; @@ -21,10 +23,10 @@ /** * Class \SAML2\XML\saml\AuthnContextTest * - * @covers \SimpleSAML\SAML2\XML\saml\AuthnContext - * @covers \SimpleSAML\SAML2\XML\saml\AbstractSamlElement * @package simplesamlphp/saml2 */ +#[CoversClass(AuthnContext::class)] +#[CoversClass(AbstractSamlElement::class)] final class AuthnContextTest extends TestCase { /** @var \DOMDocument */ diff --git a/tests/SAML2/XML/saml/AuthnContextWithClassRefAndDeclRefTest.php b/tests/SAML2/XML/saml/AuthnContextWithClassRefAndDeclRefTest.php index 23486105b..5113ec06c 100644 --- a/tests/SAML2/XML/saml/AuthnContextWithClassRefAndDeclRefTest.php +++ b/tests/SAML2/XML/saml/AuthnContextWithClassRefAndDeclRefTest.php @@ -4,8 +4,10 @@ namespace SimpleSAML\Test\SAML2\XML\saml; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use SimpleSAML\SAML2\Constants as C; +use SimpleSAML\SAML2\XML\saml\AbstractSamlElement; use SimpleSAML\SAML2\XML\saml\AuthenticatingAuthority; use SimpleSAML\SAML2\XML\saml\AuthnContext; use SimpleSAML\SAML2\XML\saml\AuthnContextClassRef; @@ -20,10 +22,10 @@ /** * Class \SAML2\XML\saml\AuthnContextWithClassRefAndDeclRefTest * - * @covers \SimpleSAML\SAML2\XML\saml\AuthnContext - * @covers \SimpleSAML\SAML2\XML\saml\AbstractSamlElement * @package simplesamlphp/saml2 */ +#[CoversClass(AuthnContext::class)] +#[CoversClass(AbstractSamlElement::class)] final class AuthnContextWithClassRefAndDeclRefTest extends TestCase { use SchemaValidationTestTrait; diff --git a/tests/SAML2/XML/saml/AuthnContextWithClassRefAndDeclTest.php b/tests/SAML2/XML/saml/AuthnContextWithClassRefAndDeclTest.php index 156a80b74..efc8886ca 100644 --- a/tests/SAML2/XML/saml/AuthnContextWithClassRefAndDeclTest.php +++ b/tests/SAML2/XML/saml/AuthnContextWithClassRefAndDeclTest.php @@ -4,8 +4,10 @@ namespace SimpleSAML\Test\SAML2\XML\saml; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use SimpleSAML\SAML2\Constants as C; +use SimpleSAML\SAML2\XML\saml\AbstractSamlElement; use SimpleSAML\SAML2\XML\saml\AuthenticatingAuthority; use SimpleSAML\SAML2\XML\saml\AuthnContext; use SimpleSAML\SAML2\XML\saml\AuthnContextClassRef; @@ -22,10 +24,10 @@ /** * Class \SAML2\XML\saml\AuthnContextWithClassRefAndDeclTest * - * @covers \SimpleSAML\SAML2\XML\saml\AuthnContext - * @covers \SimpleSAML\SAML2\XML\saml\AbstractSamlElement * @package simplesamlphp/saml2 */ +#[CoversClass(AuthnContext::class)] +#[CoversClass(AbstractSamlElement::class)] final class AuthnContextWithClassRefAndDeclTest extends TestCase { use SchemaValidationTestTrait; diff --git a/tests/SAML2/XML/saml/AuthnContextWithClassRefTest.php b/tests/SAML2/XML/saml/AuthnContextWithClassRefTest.php index 15bbb7b70..7eb93fb65 100644 --- a/tests/SAML2/XML/saml/AuthnContextWithClassRefTest.php +++ b/tests/SAML2/XML/saml/AuthnContextWithClassRefTest.php @@ -4,8 +4,10 @@ namespace SimpleSAML\Test\SAML2\XML\saml; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use SimpleSAML\SAML2\Constants as C; +use SimpleSAML\SAML2\XML\saml\AbstractSamlElement; use SimpleSAML\SAML2\XML\saml\AuthenticatingAuthority; use SimpleSAML\SAML2\XML\saml\AuthnContext; use SimpleSAML\SAML2\XML\saml\AuthnContextClassRef; @@ -19,10 +21,10 @@ /** * Class \SAML2\XML\saml\AuthnContextWithClassRefTest * - * @covers \SimpleSAML\SAML2\XML\saml\AuthnContext - * @covers \SimpleSAML\SAML2\XML\saml\AbstractSamlElement * @package simplesamlphp/saml2 */ +#[CoversClass(AuthnContext::class)] +#[CoversClass(AbstractSamlElement::class)] final class AuthnContextWithClassRefTest extends TestCase { use SchemaValidationTestTrait; diff --git a/tests/SAML2/XML/saml/AuthnContextWithDeclRefTest.php b/tests/SAML2/XML/saml/AuthnContextWithDeclRefTest.php index ba99da549..fcea524cc 100644 --- a/tests/SAML2/XML/saml/AuthnContextWithDeclRefTest.php +++ b/tests/SAML2/XML/saml/AuthnContextWithDeclRefTest.php @@ -4,7 +4,9 @@ namespace SimpleSAML\Test\SAML2\XML\saml; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; +use SimpleSAML\SAML2\XML\saml\AbstractSamlElement; use SimpleSAML\SAML2\XML\saml\AuthenticatingAuthority; use SimpleSAML\SAML2\XML\saml\AuthnContext; use SimpleSAML\SAML2\XML\saml\AuthnContextDeclRef; @@ -18,10 +20,10 @@ /** * Class \SAML2\XML\saml\AuthnContextWithDeclRefTest * - * @covers \SimpleSAML\SAML2\XML\saml\AuthnContext - * @covers \SimpleSAML\SAML2\XML\saml\AbstractSamlElement * @package simplesamlphp/saml2 */ +#[CoversClass(AuthnContext::class)] +#[CoversClass(AbstractSamlElement::class)] final class AuthnContextWithDeclRefTest extends TestCase { use SchemaValidationTestTrait; diff --git a/tests/SAML2/XML/saml/AuthnContextWithDeclTest.php b/tests/SAML2/XML/saml/AuthnContextWithDeclTest.php index 7dcbd3b99..9511e7dd5 100644 --- a/tests/SAML2/XML/saml/AuthnContextWithDeclTest.php +++ b/tests/SAML2/XML/saml/AuthnContextWithDeclTest.php @@ -4,7 +4,9 @@ namespace SimpleSAML\Test\SAML2\XML\saml; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; +use SimpleSAML\SAML2\XML\saml\AbstractSamlElement; use SimpleSAML\SAML2\XML\saml\AuthenticatingAuthority; use SimpleSAML\SAML2\XML\saml\AuthnContext; use SimpleSAML\SAML2\XML\saml\AuthnContextDecl; @@ -20,10 +22,10 @@ /** * Class \SAML2\XML\saml\AuthnContextWithDeclTest * - * @covers \SimpleSAML\SAML2\XML\saml\AuthnContext - * @covers \SimpleSAML\SAML2\XML\saml\AbstractSamlElement * @package simplesamlphp/saml2 */ +#[CoversClass(AuthnContext::class)] +#[CoversClass(AbstractSamlElement::class)] final class AuthnContextWithDeclTest extends TestCase { use SchemaValidationTestTrait; diff --git a/tests/SAML2/XML/saml/AuthnStatementTest.php b/tests/SAML2/XML/saml/AuthnStatementTest.php index 07e310af3..8c8b5b3aa 100644 --- a/tests/SAML2/XML/saml/AuthnStatementTest.php +++ b/tests/SAML2/XML/saml/AuthnStatementTest.php @@ -5,9 +5,11 @@ namespace SimpleSAML\Test\SAML2\XML\saml; use DateTimeImmutable; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use SimpleSAML\SAML2\Constants as C; use SimpleSAML\SAML2\Utils\XPath; +use SimpleSAML\SAML2\XML\saml\AbstractSamlElement; use SimpleSAML\SAML2\XML\saml\AuthenticatingAuthority; use SimpleSAML\SAML2\XML\saml\AuthnContext; use SimpleSAML\SAML2\XML\saml\AuthnContextClassRef; @@ -26,10 +28,10 @@ /** * Class \SAML2\XML\saml\AuthnStatementTest * - * @covers \SimpleSAML\SAML2\XML\saml\AuthnStatement - * @covers \SimpleSAML\SAML2\XML\saml\AbstractSamlElement * @package simplesamlphp/saml2 */ +#[CoversClass(AuthnStatement::class)] +#[CoversClass(AbstractSamlElement::class)] final class AuthnStatementTest extends TestCase { use SchemaValidationTestTrait; diff --git a/tests/SAML2/XML/saml/AuthzDecisionStatementTest.php b/tests/SAML2/XML/saml/AuthzDecisionStatementTest.php index 497d9ce9e..880669b7a 100644 --- a/tests/SAML2/XML/saml/AuthzDecisionStatementTest.php +++ b/tests/SAML2/XML/saml/AuthzDecisionStatementTest.php @@ -5,8 +5,10 @@ namespace SimpleSAML\SAML2\Test\SAML2\XML\saml; use DOMDocument; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use SimpleSAML\SAML2\XML\Decision; +use SimpleSAML\SAML2\XML\saml\AbstractSamlElement; use SimpleSAML\SAML2\XML\saml\Action; use SimpleSAML\SAML2\XML\saml\AuthzDecisionStatement; use SimpleSAML\SAML2\XML\saml\Evidence; @@ -20,12 +22,11 @@ /** * Class \SimpleSAML\SAML2\XML\saml\AuthzDecisionStatementTest * - * @covers \SimpleSAML\SAML2\XML\saml\AuthzDecisionStatement - * @covers \SimpleSAML\SAML2\XML\saml\AbstractStatement - * @covers \SimpleSAML\SAML2\XML\saml\AbstractSamlElement - * * @package simplesamlphp/saml2 */ +#[CoversClass(AuthzDecisionStatement::class)] +#[CoversClass(AbstractStatement::class)] +#[CoversClass(AbstractSamlElement::class)] final class AuthzDecisionStatementTest extends TestCase { use SchemaValidationTestTrait; diff --git a/tests/SAML2/XML/saml/BaseIDTest.php b/tests/SAML2/XML/saml/BaseIDTest.php index 02e5a2d7c..d024b8b20 100644 --- a/tests/SAML2/XML/saml/BaseIDTest.php +++ b/tests/SAML2/XML/saml/BaseIDTest.php @@ -4,10 +4,12 @@ namespace SimpleSAML\Test\SAML2\XML\saml; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use SimpleSAML\SAML2\Compat\AbstractContainer; use SimpleSAML\SAML2\Compat\ContainerSingleton; use SimpleSAML\SAML2\XML\saml\AbstractBaseID; +use SimpleSAML\SAML2\XML\saml\AbstractSamlElement; use SimpleSAML\SAML2\XML\saml\Audience; use SimpleSAML\SAML2\XML\saml\UnknownID; use SimpleSAML\Test\SAML2\Constants as C; @@ -22,13 +24,12 @@ /** * Class \SAML2\XML\saml\BaseIDTest * - * @covers \SimpleSAML\SAML2\XML\saml\UnknownID - * @covers \SimpleSAML\SAML2\XML\saml\AbstractBaseID - * @covers \SimpleSAML\SAML2\XML\saml\AbstractBaseIDType - * @covers \SimpleSAML\SAML2\XML\saml\AbstractSamlElement - * * @package simplesamlphp/saml2 */ +#[CoversClass(UnknownID::class)] +#[CoversClass(AbstractBaseID::class)] +#[CoversClass(AbstractBaseIDType::class)] +#[CoversClass(AbstractSamlElement::class)] final class BaseIDTest extends TestCase { use SchemaValidationTestTrait; diff --git a/tests/SAML2/XML/saml/ConditionTest.php b/tests/SAML2/XML/saml/ConditionTest.php index 68ff0e622..dc288ef4f 100644 --- a/tests/SAML2/XML/saml/ConditionTest.php +++ b/tests/SAML2/XML/saml/ConditionTest.php @@ -4,10 +4,12 @@ namespace SimpleSAML\Test\SAML2\XML\saml; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use SimpleSAML\SAML2\Compat\AbstractContainer; use SimpleSAML\SAML2\Compat\ContainerSingleton; use SimpleSAML\SAML2\XML\saml\AbstractCondition; +use SimpleSAML\SAML2\XML\saml\AbstractSamlElement; use SimpleSAML\SAML2\XML\saml\Audience; use SimpleSAML\SAML2\XML\saml\UnknownCondition; use SimpleSAML\Test\SAML2\Constants as C; @@ -22,13 +24,12 @@ /** * Class \SAML2\XML\saml\ConditionTest * - * @covers \SimpleSAML\SAML2\XML\saml\UnknownCondition - * @covers \SimpleSAML\SAML2\XML\saml\AbstractCondition - * @covers \SimpleSAML\SAML2\XML\saml\AbstractConditionType - * @covers \SimpleSAML\SAML2\XML\saml\AbstractSamlElement - * * @package simplesamlphp/saml2 */ +#[CoversClass(Condition::class)] +#[CoversClass(AbstractCondition::class)] +#[CoversClass(AbstractConditionType::class)] +#[CoversClass(AbstractSamlElement::class)] final class ConditionTest extends TestCase { use SchemaValidationTestTrait; diff --git a/tests/SAML2/XML/saml/ConditionsTest.php b/tests/SAML2/XML/saml/ConditionsTest.php index e56cc41ca..751e400e7 100644 --- a/tests/SAML2/XML/saml/ConditionsTest.php +++ b/tests/SAML2/XML/saml/ConditionsTest.php @@ -5,8 +5,10 @@ namespace SimpleSAML\Test\SAML2\XML\saml; use DateTimeImmutable; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use SimpleSAML\SAML2\Constants as C; +use SimpleSAML\SAML2\XML\saml\AbstractSamlElement; use SimpleSAML\SAML2\XML\saml\Audience; use SimpleSAML\SAML2\XML\saml\AudienceRestriction; use SimpleSAML\SAML2\XML\saml\Conditions; @@ -22,11 +24,10 @@ /** * Class \SAML2\XML\saml\ConditionsTest * - * @covers \SimpleSAML\SAML2\XML\saml\Conditions - * @covers \SimpleSAML\SAML2\XML\saml\AbstractSamlElement - * * @package simplesamlphp/saml2 */ +#[CoversClass(Conditions::class)] +#[CoversClass(AbstractSamlElement::class)] final class ConditionsTest extends TestCase { use SchemaValidationTestTrait; diff --git a/tests/SAML2/XML/saml/EncryptedAssertionTest.php b/tests/SAML2/XML/saml/EncryptedAssertionTest.php index 1b81fd890..5607dd539 100644 --- a/tests/SAML2/XML/saml/EncryptedAssertionTest.php +++ b/tests/SAML2/XML/saml/EncryptedAssertionTest.php @@ -4,10 +4,12 @@ namespace SimpleSAML\Test\SAML2\XML\saml; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use Psr\Clock\ClockInterface; use SimpleSAML\SAML2\Compat\AbstractContainer; use SimpleSAML\SAML2\Compat\ContainerSingleton; +use SimpleSAML\SAML2\XML\saml\AbstractSamlElement; use SimpleSAML\SAML2\XML\saml\Assertion; use SimpleSAML\SAML2\XML\saml\EncryptedAssertion; use SimpleSAML\SAML2\XML\saml\Issuer; @@ -37,9 +39,9 @@ * Class \SAML2\EncryptedAssertionTest * * @package simplesamlphp/saml2 - * @covers \SimpleSAML\SAML2\XML\saml\EncryptedAssertion - * @covers \SimpleSAML\SAML2\XML\saml\AbstractSamlElement */ +#[CoversClass(EncryptedAssertion::class)] +#[CoversClass(AbstractSamlElement::class)] final class EncryptedAssertionTest extends TestCase { use SchemaValidationTestTrait; diff --git a/tests/SAML2/XML/saml/EncryptedAttributeTest.php b/tests/SAML2/XML/saml/EncryptedAttributeTest.php index 275ac53ce..9f97723d7 100644 --- a/tests/SAML2/XML/saml/EncryptedAttributeTest.php +++ b/tests/SAML2/XML/saml/EncryptedAttributeTest.php @@ -4,9 +4,11 @@ namespace SimpleSAML\Test\SAML2\XML\saml; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use SimpleSAML\SAML2\Compat\AbstractContainer; use SimpleSAML\SAML2\Compat\ContainerSingleton; +use SimpleSAML\SAML2\XML\saml\AbstractSamlElement; use SimpleSAML\SAML2\XML\saml\Attribute; use SimpleSAML\SAML2\XML\saml\AttributeValue; use SimpleSAML\SAML2\XML\saml\EncryptedAttribute; @@ -23,9 +25,9 @@ * Class \SAML2\XML\saml\EncryptedAttributeTest * * @package simplesamlphp/saml2 - * @covers \SimpleSAML\SAML2\XML\saml\EncryptedAttribute - * @covers \SimpleSAML\SAML2\XML\saml\AbstractSamlElement */ +#[CoversClass(EncryptedAttribute::class)] +#[CoversClass(AbstractSamlElement::class)] final class EncryptedAttributeTest extends TestCase { use SchemaValidationTestTrait; diff --git a/tests/SAML2/XML/saml/EncryptedIDTest.php b/tests/SAML2/XML/saml/EncryptedIDTest.php index 607a4ecb6..c42784d69 100644 --- a/tests/SAML2/XML/saml/EncryptedIDTest.php +++ b/tests/SAML2/XML/saml/EncryptedIDTest.php @@ -5,10 +5,12 @@ namespace SimpleSAML\Test\SAML2\XML\saml; use InvalidArgumentException; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use SimpleSAML\SAML2\Compat\AbstractContainer; use SimpleSAML\SAML2\Compat\ContainerSingleton; use SimpleSAML\SAML2\Utils\XPath; +use SimpleSAML\SAML2\XML\saml\AbstractSamlElement; use SimpleSAML\SAML2\XML\saml\Attribute; use SimpleSAML\SAML2\XML\saml\Audience; use SimpleSAML\SAML2\XML\saml\EncryptedID; @@ -37,10 +39,10 @@ /** * Class EncryptedIDTest * - * @covers \SimpleSAML\SAML2\XML\saml\EncryptedID - * @covers \SimpleSAML\SAML2\XML\saml\AbstractSamlElement * @package simplesamlphp/saml2 */ +#[CoversClass(EncryptedID::class)] +#[CoversClass(AbstractSamlElement::class)] final class EncryptedIDTest extends TestCase { use SchemaValidationTestTrait; diff --git a/tests/SAML2/XML/saml/EvidenceTest.php b/tests/SAML2/XML/saml/EvidenceTest.php index 005c178c3..1e744c86b 100644 --- a/tests/SAML2/XML/saml/EvidenceTest.php +++ b/tests/SAML2/XML/saml/EvidenceTest.php @@ -5,7 +5,9 @@ namespace SimpleSAML\SAML2\Test\SAML2\XML\saml; use DOMDocument; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; +use SimpleSAML\SAML2\XML\saml\AbstractSamlElement; use SimpleSAML\SAML2\XML\saml\Assertion; use SimpleSAML\SAML2\XML\saml\AssertionIDRef; use SimpleSAML\SAML2\XML\saml\AssertionURIRef; @@ -21,11 +23,10 @@ /** * Class \SimpleSAML\SAML2\XML\saml\EvidenceTest * - * @covers \SimpleSAML\SAML2\XML\saml\Evidence - * @covers \SimpleSAML\SAML2\XML\saml\AbstractSamlElement - * * @package simplesamlphp/saml2 */ +#[CoversClass(Evidence::class)] +#[CoversClass(AbstractSamlElement::class)] final class EvidenceTest extends TestCase { use SchemaValidationTestTrait; diff --git a/tests/SAML2/XML/saml/IssuerTest.php b/tests/SAML2/XML/saml/IssuerTest.php index 7edd51c88..022061e24 100644 --- a/tests/SAML2/XML/saml/IssuerTest.php +++ b/tests/SAML2/XML/saml/IssuerTest.php @@ -4,9 +4,11 @@ namespace SimpleSAML\Test\SAML2\XML\saml; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use SimpleSAML\Assert\AssertionFailedException; use SimpleSAML\SAML2\Constants as C; +use SimpleSAML\SAML2\XML\saml\AbstractSamlElement; use SimpleSAML\SAML2\XML\saml\Issuer; use SimpleSAML\XML\DOMDocumentFactory; use SimpleSAML\XML\TestUtils\SchemaValidationTestTrait; @@ -18,11 +20,11 @@ /** * Class \SAML2\XML\saml\IssuerTest * - * @covers \SimpleSAML\SAML2\XML\saml\Issuer - * @covers \SimpleSAML\SAML2\XML\saml\NameIDType - * @covers \SimpleSAML\SAML2\XML\saml\AbstractSamlElement * @package simplesamlphp/saml2 */ +#[CoversClass(Issuer::class)] +#[CoversClass(NameIDType::class)] +#[CoversClass(AbstractSamlElement::class)] final class IssuerTest extends TestCase { use SchemaValidationTestTrait; diff --git a/tests/SAML2/XML/saml/NameIDTest.php b/tests/SAML2/XML/saml/NameIDTest.php index a4d6ce145..141d59e85 100644 --- a/tests/SAML2/XML/saml/NameIDTest.php +++ b/tests/SAML2/XML/saml/NameIDTest.php @@ -4,7 +4,9 @@ namespace SimpleSAML\Test\SAML2\XML\saml; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; +use SimpleSAML\SAML2\XML\saml\AbstractSamlElement; use SimpleSAML\SAML2\XML\saml\NameID; use SimpleSAML\XML\DOMDocumentFactory; use SimpleSAML\XML\TestUtils\ArrayizableElementTestTrait; @@ -17,12 +19,11 @@ /** * Class \SAML2\XML\saml\NameIDTest * - * @covers \SimpleSAML\SAML2\XML\saml\NameID - * @covers \SimpleSAML\SAML2\XML\saml\NameIDType - * @covers \SimpleSAML\SAML2\XML\saml\AbstractSamlElement - * * @package simplesamlphp/saml2 */ +#[CoversClass(NameID::class)] +#[CoversClass(NameIDType::class)] +#[CoversClass(AbstractSamlElement::class)] final class NameIDTest extends TestCase { use ArrayizableElementTestTrait; diff --git a/tests/SAML2/XML/saml/OneTimeUseTest.php b/tests/SAML2/XML/saml/OneTimeUseTest.php index bb61f51c8..9f646f6c8 100644 --- a/tests/SAML2/XML/saml/OneTimeUseTest.php +++ b/tests/SAML2/XML/saml/OneTimeUseTest.php @@ -4,7 +4,9 @@ namespace SimpleSAML\SAML2\Test\SAML2\XML\saml; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; +use SimpleSAML\SAML2\XML\saml\AbstractSamlElement; use SimpleSAML\SAML2\XML\saml\OneTimeUse; use SimpleSAML\XML\DOMDocumentFactory; use SimpleSAML\XML\TestUtils\SchemaValidationTestTrait; @@ -16,12 +18,11 @@ /** * Class \SimpleSAML\SAML2\XML\saml\OneTimeUseTest * - * @covers \SimpleSAML\SAML2\XML\saml\OneTimeUse - * @covers \SimpleSAML\SAML2\XML\saml\AbstractConditionType - * @covers \SimpleSAML\SAML2\XML\saml\AbstractSamlElement - * * @package simplesamlphp/saml2 */ +#[CoversClass(OneTimeUse::class)] +#[CoversClass(AbstractConditionType::class)] +#[CoversClass(AbstractSamlElement::class)] final class OneTimeUseTest extends TestCase { use SchemaValidationTestTrait; diff --git a/tests/SAML2/XML/saml/ProxyRestrictionTest.php b/tests/SAML2/XML/saml/ProxyRestrictionTest.php index 9ac2c5d99..7c4a115c3 100644 --- a/tests/SAML2/XML/saml/ProxyRestrictionTest.php +++ b/tests/SAML2/XML/saml/ProxyRestrictionTest.php @@ -4,7 +4,9 @@ namespace SimpleSAML\Test\SAML2\XML\saml; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; +use SimpleSAML\SAML2\XML\saml\AbstractSamlElement; use SimpleSAML\SAML2\XML\saml\Audience; use SimpleSAML\SAML2\XML\saml\ProxyRestriction; use SimpleSAML\XML\DOMDocumentFactory; @@ -17,11 +19,10 @@ /** * Class \SAML2\XML\saml\ProxyRestrictionTest * - * @covers \SimpleSAML\SAML2\XML\saml\ProxyRestriction - * @covers \SimpleSAML\SAML2\XML\saml\AbstractSamlElement - * * @package simplesamlphp/saml2 */ +#[CoversClass(ProxyRestriction::class)] +#[CoversClass(AbstractSamlElement::class)] final class ProxyRestrictionTest extends TestCase { use SchemaValidationTestTrait; diff --git a/tests/SAML2/XML/saml/StatementTest.php b/tests/SAML2/XML/saml/StatementTest.php index 23fd10458..290d2b916 100644 --- a/tests/SAML2/XML/saml/StatementTest.php +++ b/tests/SAML2/XML/saml/StatementTest.php @@ -4,9 +4,11 @@ namespace SimpleSAML\Test\SAML2\XML\saml; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use SimpleSAML\SAML2\Compat\AbstractContainer; use SimpleSAML\SAML2\Compat\ContainerSingleton; +use SimpleSAML\SAML2\XML\saml\AbstractSamlElement; use SimpleSAML\SAML2\XML\saml\AbstractStatement; use SimpleSAML\SAML2\XML\saml\Audience; use SimpleSAML\SAML2\XML\saml\UnknownStatement; @@ -22,12 +24,12 @@ /** * Class \SAML2\XML\saml\StatementTest * - * @covers \SimpleSAML\SAML2\XML\saml\UnknownStatement - * @covers \SimpleSAML\SAML2\XML\saml\AbstractStatement - * @covers \SimpleSAML\SAML2\XML\saml\AbstractStatementType - * @covers \SimpleSAML\SAML2\XML\saml\AbstractSamlElement * @package simplesamlphp/saml2 */ +#[CoversClass(UnknownStatement::class)] +#[CoversClass(AbstractStatement::class)] +#[CoversClass(AbstractStatementType::class)] +#[CoversClass(AbstractSamlElement::class)] final class StatementTest extends TestCase { use SchemaValidationTestTrait; diff --git a/tests/SAML2/XML/saml/SubjectConfirmationDataTest.php b/tests/SAML2/XML/saml/SubjectConfirmationDataTest.php index 6bd374a78..b2efd56e0 100644 --- a/tests/SAML2/XML/saml/SubjectConfirmationDataTest.php +++ b/tests/SAML2/XML/saml/SubjectConfirmationDataTest.php @@ -5,7 +5,9 @@ namespace SimpleSAML\Test\SAML2\XML\saml; use DateTimeImmutable; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; +use SimpleSAML\SAML2\XML\saml\AbstractSamlElement; use SimpleSAML\SAML2\XML\saml\SubjectConfirmationData; use SimpleSAML\Test\SAML2\Constants as C; use SimpleSAML\XML\Attribute as XMLAttribute; @@ -22,10 +24,10 @@ /** * Class \SAML2\XML\saml\SubjectConfirmationDataTest * - * @covers \SimpleSAML\SAML2\XML\saml\SubjectConfirmationData - * @covers \SimpleSAML\SAML2\XML\saml\AbstractSamlElement * @package simplesamlphp/saml2 */ +#[CoversClass(SubjectConfirmationData::class)] +#[CoversClass(AbstractSamlElement::class)] final class SubjectConfirmationDataTest extends TestCase { use SchemaValidationTestTrait; diff --git a/tests/SAML2/XML/saml/SubjectConfirmationTest.php b/tests/SAML2/XML/saml/SubjectConfirmationTest.php index 55b28c385..dbe324cfe 100644 --- a/tests/SAML2/XML/saml/SubjectConfirmationTest.php +++ b/tests/SAML2/XML/saml/SubjectConfirmationTest.php @@ -5,10 +5,12 @@ namespace SimpleSAML\Test\SAML2\XML\saml; use DateTimeImmutable; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use Psr\Clock\ClockInterface; use SimpleSAML\SAML2\Utils; use SimpleSAML\SAML2\Utils\XPath; +use SimpleSAML\SAML2\XML\saml\AbstractSamlElement; use SimpleSAML\SAML2\XML\saml\NameID; use SimpleSAML\SAML2\XML\saml\SubjectConfirmation; use SimpleSAML\SAML2\XML\saml\SubjectConfirmationData; @@ -29,10 +31,10 @@ /** * Class \SAML2\XML\saml\SubjectConfirmationTest * - * @covers \SimpleSAML\SAML2\XML\saml\SubjectConfirmation - * @covers \SimpleSAML\SAML2\XML\saml\AbstractSamlElement * @package simplesamlphp/saml2 */ +#[CoversClass(SubjectConfirmation::class)] +#[CoversClass(AbstractSamlElement::class)] final class SubjectConfirmationTest extends TestCase { use SchemaValidationTestTrait; diff --git a/tests/SAML2/XML/saml/SubjectLocalityTest.php b/tests/SAML2/XML/saml/SubjectLocalityTest.php index 0d7580cc8..ff7141ded 100644 --- a/tests/SAML2/XML/saml/SubjectLocalityTest.php +++ b/tests/SAML2/XML/saml/SubjectLocalityTest.php @@ -4,8 +4,10 @@ namespace SimpleSAML\Test\SAML2\XML\saml; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use SimpleSAML\SAML2\Constants as C; +use SimpleSAML\SAML2\XML\saml\AbstractSamlElement; use SimpleSAML\SAML2\XML\saml\SubjectLocality; use SimpleSAML\XML\DOMDocumentFactory; use SimpleSAML\XML\TestUtils\SchemaValidationTestTrait; @@ -17,10 +19,10 @@ /** * Class \SAML2\XML\saml\SubjectLocalityTest * - * @covers \SimpleSAML\SAML2\XML\saml\SubjectLocality - * @covers \SimpleSAML\SAML2\XML\saml\AbstractSamlElement * @package simplesamlphp/saml2 */ +#[CoversClass(SubjectLocality::class)] +#[CoversClass(AbstractSamlElement::class)] final class SubjectLocalityTest extends TestCase { use SchemaValidationTestTrait; diff --git a/tests/SAML2/XML/saml/SubjectTest.php b/tests/SAML2/XML/saml/SubjectTest.php index ba4ea2768..901bf6733 100644 --- a/tests/SAML2/XML/saml/SubjectTest.php +++ b/tests/SAML2/XML/saml/SubjectTest.php @@ -6,8 +6,10 @@ use DateTimeImmutable; use DOMDocument; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use SimpleSAML\SAML2\Utils\XPath; +use SimpleSAML\SAML2\XML\saml\AbstractSamlElement; use SimpleSAML\SAML2\XML\saml\AbstractBaseID; use SimpleSAML\SAML2\XML\saml\Audience; use SimpleSAML\SAML2\XML\saml\NameID; @@ -31,11 +33,10 @@ /** * Class \SAML2\XML\saml\SubjectTest * - * @covers \SimpleSAML\SAML2\XML\saml\Subject - * @covers \SimpleSAML\SAML2\XML\saml\AbstractSamlElement - * * @package SimpleSAMLphp */ +#[CoversClass(Subject::class)] +#[CoversClass(AbstractSamlElement::class)] final class SubjectTest extends TestCase { use SchemaValidationTestTrait; diff --git a/tests/SAML2/XML/samlp/AbstractMessageTest.php b/tests/SAML2/XML/samlp/AbstractMessageTest.php index be82e62a6..7528f58d3 100644 --- a/tests/SAML2/XML/samlp/AbstractMessageTest.php +++ b/tests/SAML2/XML/samlp/AbstractMessageTest.php @@ -6,6 +6,7 @@ use DOMElement; use Exception; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use Psr\Clock\ClockInterface; use SimpleSAML\SAML2\Constants as C; @@ -13,6 +14,8 @@ use SimpleSAML\SAML2\Utils; use SimpleSAML\SAML2\Utils\XPath; use SimpleSAML\SAML2\XML\saml\Issuer; +use SimpleSAML\SAML2\XML\samlp\AbstractMessage; +use SimpleSAML\SAML2\XML\samlp\AbstractSamlpElement; use SimpleSAML\SAML2\XML\samlp\Extensions; use SimpleSAML\SAML2\XML\samlp\MessageFactory; use SimpleSAML\SAML2\XML\samlp\Response; @@ -28,10 +31,10 @@ use function dirname; /** - * @covers \SimpleSAML\SAML2\XML\samlp\AbstractMessage - * @covers \SimpleSAML\SAML2\XML\samlp\AbstractSamlpElement * @package simplesamlphp/saml2 */ +#[CoversClass(AbstractMessage::class)] +#[CoversClass(AbstractSamlpElement::class)] final class AbstractMessageTest extends TestCase { /** @var \Psr\Clock\ClockInterface */ diff --git a/tests/SAML2/XML/samlp/AbstractStatusResponseTest.php b/tests/SAML2/XML/samlp/AbstractStatusResponseTest.php index 1257b2d43..c649df405 100644 --- a/tests/SAML2/XML/samlp/AbstractStatusResponseTest.php +++ b/tests/SAML2/XML/samlp/AbstractStatusResponseTest.php @@ -4,12 +4,16 @@ namespace SimpleSAML\Test\SAML2\XML\samlp; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use Psr\Clock\ClockInterface; use SimpleSAML\SAML2\Constants as C; use SimpleSAML\SAML2\Utils; use SimpleSAML\SAML2\Utils\XPath; use SimpleSAML\SAML2\XML\saml\Issuer; +use SimpleSAML\SAML2\XML\samlp\AbstractMessage; +use SimpleSAML\SAML2\XML\samlp\AbstractSamlpElement; +use SimpleSAML\SAML2\XML\samlp\AbstractStatusResponse; use SimpleSAML\SAML2\XML\samlp\Extensions; use SimpleSAML\SAML2\XML\samlp\Response; use SimpleSAML\SAML2\XML\samlp\Status; @@ -25,11 +29,11 @@ /** * Class \SimpleSAML\SAML2\XML\samlp\AbstractStatusResponseTest * - * @covers \SimpleSAML\SAML2\XML\samlp\AbstractStatusResponse - * @covers \SimpleSAML\SAML2\XML\samlp\AbstractMessage - * @covers \SimpleSAML\SAML2\XML\samlp\AbstractSamlpElement * @package simplesamlphp/saml2 */ +#[CoversClass(AbstractStatusResponse::class)] +#[CoversClass(AbstractMessage::class)] +#[CoversClass(AbstractSamlpElement::class)] final class AbstractStatusResponseTest extends TestCase { /** @var \Psr\Clock\ClockInterface */ diff --git a/tests/SAML2/XML/samlp/ArtifactResolveTest.php b/tests/SAML2/XML/samlp/ArtifactResolveTest.php index f3913c434..592805b44 100644 --- a/tests/SAML2/XML/samlp/ArtifactResolveTest.php +++ b/tests/SAML2/XML/samlp/ArtifactResolveTest.php @@ -5,8 +5,12 @@ namespace SimpleSAML\Test\SAML2\XML\samlp; use DateTimeImmutable; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use SimpleSAML\SAML2\XML\saml\Issuer; +use SimpleSAML\SAML2\XML\samlp\AbstractMessage; +use SimpleSAML\SAML2\XML\samlp\AbstractRequest; +use SimpleSAML\SAML2\XML\samlp\AbstractSamlpElement; use SimpleSAML\SAML2\XML\samlp\ArtifactResolve; use SimpleSAML\XML\DOMDocumentFactory; use SimpleSAML\XML\TestUtils\SchemaValidationTestTrait; @@ -17,12 +21,12 @@ use function strval; /** - * @covers \SimpleSAML\SAML2\XML\samlp\ArtifactResolve - * @covers \SimpleSAML\SAML2\XML\samlp\AbstractRequest - * @covers \SimpleSAML\SAML2\XML\samlp\AbstractMessage - * @covers \SimpleSAML\SAML2\XML\samlp\AbstractSamlpElement * @package simplesamlphp/saml2 */ +#[CoversClass(ArtifactResolve::class)] +#[CoversClass(AbstractRequest::class)] +#[CoversClass(AbstractMessage::class)] +#[CoversClass(AbstractSamlpElement::class)] final class ArtifactResolveTest extends TestCase { use SchemaValidationTestTrait; diff --git a/tests/SAML2/XML/samlp/ArtifactResponseTest.php b/tests/SAML2/XML/samlp/ArtifactResponseTest.php index 6bf35e12e..315de6437 100644 --- a/tests/SAML2/XML/samlp/ArtifactResponseTest.php +++ b/tests/SAML2/XML/samlp/ArtifactResponseTest.php @@ -5,9 +5,13 @@ namespace SimpleSAML\Test\SAML2\XML\samlp; use DateTimeImmutable; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use SimpleSAML\SAML2\Constants as C; use SimpleSAML\SAML2\XML\saml\Issuer; +use SimpleSAML\SAML2\XML\samlp\AbstractMessage; +use SimpleSAML\SAML2\XML\samlp\AbstractSamlpElement; +use SimpleSAML\SAML2\XML\samlp\AbstractStausResponse; use SimpleSAML\SAML2\XML\samlp\ArtifactResponse; use SimpleSAML\SAML2\XML\samlp\AuthnRequest; use SimpleSAML\SAML2\XML\samlp\NameIDPolicy; @@ -22,12 +26,12 @@ use function strval; /** - * @covers \SimpleSAML\SAML2\XML\samlp\ArtifactResponse - * @covers \SimpleSAML\SAML2\XML\samlp\AbstractStatusResponse - * @covers \SimpleSAML\SAML2\XML\samlp\AbstractMessage - * @covers \SimpleSAML\SAML2\XML\samlp\AbstractSamlpElement * @package simplesamlphp/saml2 */ +#[CoversClass(ArtifactResponse::class)] +#[CoversClass(AbstractStatusResponse::class)] +#[CoversClass(AbstractMessage::class)] +#[CoversClass(AbstractSamlpElement::class)] final class ArtifactResponseTest extends TestCase { use SchemaValidationTestTrait; diff --git a/tests/SAML2/XML/samlp/AssertionIDRequestTest.php b/tests/SAML2/XML/samlp/AssertionIDRequestTest.php index 1fe1c2583..7a2c11f07 100644 --- a/tests/SAML2/XML/samlp/AssertionIDRequestTest.php +++ b/tests/SAML2/XML/samlp/AssertionIDRequestTest.php @@ -5,9 +5,13 @@ namespace SimpleSAML\Test\SAML2\XML\samlp; use DateTimeImmutable; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use SimpleSAML\SAML2\XML\saml\AssertionIDRef; use SimpleSAML\SAML2\XML\saml\Issuer; +use SimpleSAML\SAML2\XML\samlp\AbstractMessage; +use SimpleSAML\SAML2\XML\samlp\AbstractRequest; +use SimpleSAML\SAML2\XML\samlp\AbstractSamlpElement; use SimpleSAML\SAML2\XML\samlp\AssertionIDRequest; use SimpleSAML\XML\DOMDocumentFactory; use SimpleSAML\XML\TestUtils\SchemaValidationTestTrait; @@ -18,14 +22,14 @@ use function strval; /** - * Class \SAML2\XML\samlp\AssertionIDRequestTest + * Class \SimpleSAML\SAML2\XML\samlp\AssertionIDRequestTest * - * @covers \SimpleSAML\SAML2\XML\samlp\AssertionIDRequest - * @covers \SimpleSAML\SAML2\XML\samlp\AbstractRequest - * @covers \SimpleSAML\SAML2\XML\samlp\AbstractMessage - * @covers \SimpleSAML\SAML2\XML\samlp\AbstractSamlpElement * @package simplesamlphp/saml2 */ +#[CoversClass(AssertionIDRequest::class)] +#[CoversClass(AbstractRequest::class)] +#[CoversClass(AbstractMessage::class)] +#[CoversClass(AbstractSamlpElement::class)] final class AssertionIDRequestTest extends TestCase { use SchemaValidationTestTrait; diff --git a/tests/SAML2/XML/samlp/AttributeQueryTest.php b/tests/SAML2/XML/samlp/AttributeQueryTest.php index 51bb7673d..e8b05385f 100644 --- a/tests/SAML2/XML/samlp/AttributeQueryTest.php +++ b/tests/SAML2/XML/samlp/AttributeQueryTest.php @@ -5,6 +5,7 @@ namespace SimpleSAML\Test\SAML2\XML\samlp; use DateTimeImmutable; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use Psr\Clock\ClockInterface; use SimpleSAML\SAML2\Constants as C; @@ -15,6 +16,10 @@ use SimpleSAML\SAML2\XML\saml\Issuer; use SimpleSAML\SAML2\XML\saml\NameID; use SimpleSAML\SAML2\XML\saml\Subject; +use SimpleSAML\SAML2\XML\samlp\AbstractMessage; +use SimpleSAML\SAML2\XML\samlp\AbstractRequest; +use SimpleSAML\SAML2\XML\samlp\AbstractSamlpElement; +use SimpleSAML\SAML2\XML\samlp\AbstractSubjectQuery; use SimpleSAML\SAML2\XML\samlp\AttributeQuery; use SimpleSAML\XML\DOMDocumentFactory; use SimpleSAML\XML\Exception\MissingAttributeException; @@ -28,15 +33,15 @@ use function strval; /** - * Class \SAML2\AttributeQueryTest + * Class \SimpleSAML\SAML2\XML\samlp\AttributeQueryTest * - * @covers \SimpleSAML\SAML2\XML\samlp\AttributeQuery - * @covers \SimpleSAML\SAML2\XML\samlp\AbstractSubjectQuery - * @covers \SimpleSAML\SAML2\XML\samlp\AbstractRequest - * @covers \SimpleSAML\SAML2\XML\samlp\AbstractMessage - * @covers \SimpleSAML\SAML2\XML\samlp\AbstractSamlpElement * @package simplesamlphp/saml2 */ +#[CoversClass(AttributeQuery::class)] +#[CoversClass(AbstractSubjectQuery::class)] +#[CoversClass(AbstractRequest::class)] +#[CoversClass(AbstractMessage::class)] +#[CoversClass(AbstractSamlpElement::class)] final class AttributeQueryTest extends TestCase { use SchemaValidationTestTrait; diff --git a/tests/SAML2/XML/samlp/AuthnQueryTest.php b/tests/SAML2/XML/samlp/AuthnQueryTest.php index ee2cd544d..00212f65a 100644 --- a/tests/SAML2/XML/samlp/AuthnQueryTest.php +++ b/tests/SAML2/XML/samlp/AuthnQueryTest.php @@ -5,6 +5,7 @@ namespace SimpleSAML\Test\SAML2\XML\samlp; use DateTimeImmutable; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use SimpleSAML\SAML2\Constants as C; use SimpleSAML\SAML2\XML\Comparison; @@ -12,6 +13,10 @@ use SimpleSAML\SAML2\XML\saml\Issuer; use SimpleSAML\SAML2\XML\saml\NameID; use SimpleSAML\SAML2\XML\saml\Subject; +use SimpleSAML\SAML2\XML\samlp\AbstractMessage; +use SimpleSAML\SAML2\XML\samlp\AbstractRequest; +use SimpleSAML\SAML2\XML\samlp\AbstractSamlpElement; +use SimpleSAML\SAML2\XML\samlp\AbstractSubjectQuery; use SimpleSAML\SAML2\XML\samlp\AuthnQuery; use SimpleSAML\SAML2\XML\samlp\RequestedAuthnContext; use SimpleSAML\XML\DOMDocumentFactory; @@ -25,13 +30,13 @@ /** * Class \SimpleSAML\SAML2\XML\samlp\AuthnQueryTest * - * @covers \SimpleSAML\SAML2\XML\samlp\AuthnQuery - * @covers \SimpleSAML\SAML2\XML\samlp\AbstractSubjectQuery - * @covers \SimpleSAML\SAML2\XML\samlp\AbstractRequest - * @covers \SimpleSAML\SAML2\XML\samlp\AbstractMessage - * @covers \SimpleSAML\SAML2\XML\samlp\AbstractSamlpElement * @package simplesamlphp/saml2 */ +#[CoversClass(AuthnQuery::class)] +#[CoversClass(AbstractSubjectQuery::class)] +#[CoversClass(AbstractRequest::class)] +#[CoversClass(AbstractMessage::class)] +#[CoversClass(AbstractSamlpElement::class)] final class AuthnQueryTest extends TestCase { use SchemaValidationTestTrait; diff --git a/tests/SAML2/XML/samlp/AuthnRequestTest.php b/tests/SAML2/XML/samlp/AuthnRequestTest.php index 6da998fac..a6e39e7dd 100644 --- a/tests/SAML2/XML/samlp/AuthnRequestTest.php +++ b/tests/SAML2/XML/samlp/AuthnRequestTest.php @@ -5,6 +5,7 @@ namespace SimpleSAML\Test\SAML2\XML\samlp; use DateTimeImmutable; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use Psr\Clock\ClockInterface; use SimpleSAML\SAML2\Compat\ContainerSingleton; @@ -22,6 +23,8 @@ use SimpleSAML\SAML2\XML\saml\OneTimeUse; use SimpleSAML\SAML2\XML\saml\ProxyRestriction; use SimpleSAML\SAML2\XML\saml\Subject; +use SimpleSAML\SAML2\XML\samlp\AbstractMessage; +use SimpleSAML\SAML2\XML\samlp\AbstractSamlpElement; use SimpleSAML\SAML2\XML\samlp\AuthnRequest; use SimpleSAML\SAML2\XML\samlp\GetComplete; use SimpleSAML\SAML2\XML\samlp\IDPEntry; @@ -44,13 +47,13 @@ use function strval; /** - * Class \SAML2\XML\samlp\AuthnRequestTest + * Class \SimpleSAML\SAML2\XML\samlp\AuthnRequestTest * - * @covers \SimpleSAML\SAML2\XML\samlp\AuthnRequest - * @covers \SimpleSAML\SAML2\XML\samlp\AbstractMessage - * @covers \SimpleSAML\SAML2\XML\samlp\AbstractSamlpElement * @package simplesamlphp/saml2 */ +#[CoversClass(AuthnRequest::class)] +#[CoversClass(AbstractMessage::class)] +#[CoversClass(AbstractSamlpElement::class)] final class AuthnRequestTest extends TestCase { use SchemaValidationTestTrait; diff --git a/tests/SAML2/XML/samlp/AuthzDecisionQueryTest.php b/tests/SAML2/XML/samlp/AuthzDecisionQueryTest.php index 09982b3e1..436a2e9ca 100644 --- a/tests/SAML2/XML/samlp/AuthzDecisionQueryTest.php +++ b/tests/SAML2/XML/samlp/AuthzDecisionQueryTest.php @@ -6,6 +6,7 @@ use DateTimeImmutable; use DOMDocument; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use SimpleSAML\SAML2\XML\saml\Action; use SimpleSAML\SAML2\XML\saml\Assertion; @@ -13,6 +14,10 @@ use SimpleSAML\SAML2\XML\saml\Issuer; use SimpleSAML\SAML2\XML\saml\NameID; use SimpleSAML\SAML2\XML\saml\Subject; +use SimpleSAML\SAML2\XML\samlp\AbstractMessage; +use SimpleSAML\SAML2\XML\samlp\AbstractRequest; +use SimpleSAML\SAML2\XML\samlp\AbstractSamlpElement; +use SimpleSAML\SAML2\XML\samlp\AbstractSubjectQuery; use SimpleSAML\SAML2\XML\samlp\AuthzDecisionQuery; use SimpleSAML\Test\SAML2\Constants as C; use SimpleSAML\XML\DOMDocumentFactory; @@ -26,13 +31,13 @@ /** * Class \SimpleSAML\SAML2\XML\samlp\AuthzDecisionQueryTest * - * @covers \SimpleSAML\SAML2\XML\samlp\AuthzDecisionQuery - * @covers \SimpleSAML\SAML2\XML\samlp\AbstractSubjectQuery - * @covers \SimpleSAML\SAML2\XML\samlp\AbstractRequest - * @covers \SimpleSAML\SAML2\XML\samlp\AbstractMessage - * @covers \SimpleSAML\SAML2\XML\samlp\AbstractSamlpElement * @package simplesamlphp/saml2 */ +#[CoversClass(AuthzDecisionQuery::class)] +#[CoversClass(AbstractSubjectQuery::class)] +#[CoversClass(AbstractRequest::class)] +#[CoversClass(AbstractMessage::class)] +#[CoversClass(AbstractSamlpElement::class)] final class AuthzDecisionQueryTest extends TestCase { use SchemaValidationTestTrait; diff --git a/tests/SAML2/XML/samlp/ExtensionsTest.php b/tests/SAML2/XML/samlp/ExtensionsTest.php index 95f790fb0..0c5922bf5 100644 --- a/tests/SAML2/XML/samlp/ExtensionsTest.php +++ b/tests/SAML2/XML/samlp/ExtensionsTest.php @@ -4,9 +4,11 @@ namespace SimpleSAML\Test\SAML2\XML\samlp; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use SimpleSAML\SAML2\Exception\ProtocolViolationException; use SimpleSAML\SAML2\XML\saml\AttributeValue; +use SimpleSAML\SAML2\XML\samlp\AbstractSamlpElement; use SimpleSAML\SAML2\XML\samlp\Extensions; use SimpleSAML\XML\Chunk; use SimpleSAML\XML\DOMDocumentFactory; @@ -17,12 +19,12 @@ use function strval; /** - * Class \SAML2\XML\samlp\ExtensionsTest + * Class \SimpleSAML\SAML2\XML\samlp\ExtensionsTest * - * @covers \SimpleSAML\SAML2\XML\samlp\Extensions - * @covers \SimpleSAML\SAML2\XML\samlp\AbstractSamlpElement * @package simplesamlphp/saml2 */ +#[CoversClass(Extensions::class)] +#[CoversClass(AbstractSamlpElement::class)] final class ExtensionsTest extends TestCase { use SchemaValidationTestTrait; diff --git a/tests/SAML2/XML/samlp/GetCompleteTest.php b/tests/SAML2/XML/samlp/GetCompleteTest.php index 7d6e6ad98..fdcdfc05d 100644 --- a/tests/SAML2/XML/samlp/GetCompleteTest.php +++ b/tests/SAML2/XML/samlp/GetCompleteTest.php @@ -4,7 +4,9 @@ namespace SimpleSAML\SAML2\Test\SAML2\XML\samlp; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; +use SimpleSAML\SAML2\XML\samlp\AbstractSamlpElement; use SimpleSAML\SAML2\XML\samlp\GetComplete; use SimpleSAML\XML\DOMDocumentFactory; use SimpleSAML\XML\TestUtils\ArrayizableElementTestTrait; @@ -22,6 +24,8 @@ * * @package simplesamlphp/saml2 */ +#[CoversClass(GetComplete::class)] +#[CoversClass(AbstractSamlpElement::class)] final class GetCompleteTest extends TestCase { use ArrayizableElementTestTrait; diff --git a/tests/SAML2/XML/samlp/IDPEntryTest.php b/tests/SAML2/XML/samlp/IDPEntryTest.php index 9d0c89e76..53565418d 100644 --- a/tests/SAML2/XML/samlp/IDPEntryTest.php +++ b/tests/SAML2/XML/samlp/IDPEntryTest.php @@ -4,7 +4,9 @@ namespace SimpleSAML\Test\SAML2\XML\samlp; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; +use SimpleSAML\SAML2\XML\samlp\AbstractSamlpElement; use SimpleSAML\SAML2\XML\samlp\IDPEntry; use SimpleSAML\XML\DOMDocumentFactory; use SimpleSAML\XML\TestUtils\ArrayizableElementTestTrait; @@ -15,13 +17,12 @@ use function strval; /** - * Class \SAML2\XML\samlp\IDPEntryTest - * - * @covers \SimpleSAML\SAML2\XML\samlp\IDPEntry - * @covers \SimpleSAML\SAML2\XML\samlp\AbstractSamlpElement + * Class \SimpleSAML\SAML2\XML\samlp\IDPEntryTest * * @package simplesamlphp/saml2 */ +#[CoversClass(IDPEntry::class)] +#[CoversClass(AbstractSamlpElement::class)] final class IDPEntryTest extends TestCase { use ArrayizableElementTestTrait; diff --git a/tests/SAML2/XML/samlp/IDPListTest.php b/tests/SAML2/XML/samlp/IDPListTest.php index 022f2f9e0..747f4209b 100644 --- a/tests/SAML2/XML/samlp/IDPListTest.php +++ b/tests/SAML2/XML/samlp/IDPListTest.php @@ -4,8 +4,10 @@ namespace SimpleSAML\Test\SAML2\XML\samlp; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use SimpleSAML\SAML2\Utils\XPath; +use SimpleSAML\SAML2\XML\samlp\AbstractSamlpElement; use SimpleSAML\SAML2\XML\samlp\GetComplete; use SimpleSAML\SAML2\XML\samlp\IDPEntry; use SimpleSAML\SAML2\XML\samlp\IDPList; @@ -19,13 +21,12 @@ use function strval; /** - * Class \SAML2\XML\samlp\IDPListTest - * - * @covers \SimpleSAML\SAML2\XML\samlp\IDPList - * @covers \SimpleSAML\SAML2\XML\samlp\AbstractSamlpElement + * Class \SimpleSAML\SAML2\XML\samlp\IDPListTest * * @package simplesamlphp/saml2 */ +#[CoversClass(IDPList::class)] +#[CoversClass(AbstractSamlpElement::class)] final class IDPListTest extends TestCase { use ArrayizableElementTestTrait; diff --git a/tests/SAML2/XML/samlp/LogoutRequestTest.php b/tests/SAML2/XML/samlp/LogoutRequestTest.php index 68a005f3e..5b35b4fbe 100644 --- a/tests/SAML2/XML/samlp/LogoutRequestTest.php +++ b/tests/SAML2/XML/samlp/LogoutRequestTest.php @@ -4,6 +4,7 @@ namespace SimpleSAML\Test\SAML2\XML\samlp; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use Psr\Clock\ClockInterface; use SimpleSAML\SAML2\Compat\ContainerSingleton; @@ -13,6 +14,9 @@ use SimpleSAML\SAML2\XML\saml\EncryptedID; use SimpleSAML\SAML2\XML\saml\Issuer; use SimpleSAML\SAML2\XML\saml\NameID; +use SimpleSAML\SAML2\XML\samlp\AbstractMessage; +use SimpleSAML\SAML2\XML\samlp\AbstractRequest; +use SimpleSAML\SAML2\XML\samlp\AbstractSamlpElement; use SimpleSAML\SAML2\XML\samlp\LogoutRequest; use SimpleSAML\SAML2\XML\samlp\SessionIndex; use SimpleSAML\XML\DOMDocumentFactory; @@ -27,14 +31,14 @@ use function dirname; /** - * Class \SAML2\XML\samlp\LogoutRequestTest + * Class \SimpleSAML\SAML2\XML\samlp\LogoutRequestTest * - * @covers \SimpleSAML\SAML2\XML\samlp\LogoutRequest - * @covers \SimpleSAML\SAML2\XML\samlp\AbstractRequest - * @covers \SimpleSAML\SAML2\XML\samlp\AbstractMessage - * @covers \SimpleSAML\SAML2\XML\samlp\AbstractSamlpElement * @package simplesamlphp/saml2 */ +#[CoversClass(LogoutRequest::class)] +#[CoversClass(AbstractRequest::class)] +#[CoversClass(AbstractMessage::class)] +#[CoversClass(AbstractSamlpElement::class)] final class LogoutRequestTest extends TestCase { use SchemaValidationTestTrait; diff --git a/tests/SAML2/XML/samlp/LogoutResponseTest.php b/tests/SAML2/XML/samlp/LogoutResponseTest.php index c6642e109..eb65379b5 100644 --- a/tests/SAML2/XML/samlp/LogoutResponseTest.php +++ b/tests/SAML2/XML/samlp/LogoutResponseTest.php @@ -5,9 +5,13 @@ namespace SimpleSAML\Test\SAML2\XML\samlp; use DateTimeImmutable; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use SimpleSAML\SAML2\Constants as C; use SimpleSAML\SAML2\XML\saml\Issuer; +use SimpleSAML\SAML2\XML\samlp\AbstractMessage; +use SimpleSAML\SAML2\XML\samlp\AbstractSamlpElement; +use SimpleSAML\SAML2\XML\samlp\AbstractStatusResponse; use SimpleSAML\SAML2\XML\samlp\LogoutResponse; use SimpleSAML\SAML2\XML\samlp\Status; use SimpleSAML\SAML2\XML\samlp\StatusCode; @@ -20,14 +24,14 @@ use function strval; /** - * Class \SAML2\XML\samlp\LogoutResponseTest + * Class \SimpleSAML\SAML2\XML\samlp\LogoutResponseTest * - * @covers \SimpleSAML\SAML2\XML\samlp\LogoutResponse - * @covers \SimpleSAML\SAML2\XML\samlp\AbstractStatusResponse - * @covers \SimpleSAML\SAML2\XML\samlp\AbstractMessage - * @covers \SimpleSAML\SAML2\XML\samlp\AbstractSamlpElement * @package simplesamlphp/saml2 */ +#[CoversClass(LogoutResponse::class)] +#[CoversClass(AbstractStatusResponse::class)] +#[CoversClass(AbstractMessage::class)] +#[CoversClass(AbstractSamlpElement::class)] final class LogoutResponseTest extends TestCase { use SchemaValidationTestTrait; diff --git a/tests/SAML2/XML/samlp/MessageFactoryTest.php b/tests/SAML2/XML/samlp/MessageFactoryTest.php index 3de4f236a..4e0a676e3 100644 --- a/tests/SAML2/XML/samlp/MessageFactoryTest.php +++ b/tests/SAML2/XML/samlp/MessageFactoryTest.php @@ -4,6 +4,8 @@ namespace SimpleSAML\Test\SAML2\XML\samlp; +use PHPUnit\Framework\Attributes\CoversClass; +use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\TestCase; use SimpleSAML\SAML2\XML\saml\Attribute; use SimpleSAML\SAML2\XML\samlp\ArtifactResolve; @@ -23,6 +25,7 @@ * @covers \SimpleSAML\SAML2\XML\samlp\MessageFactory * @package simplesamlphp/saml2 */ +#[CoversClass(MessageFactory::class)] final class MessageFactoryTest extends TestCase { /** @@ -47,8 +50,8 @@ public static function provideMessages(): array /** * @param string $file * @param class-string $class - * @dataProvider provideMessages */ + #[DataProvider('provideMessages')] public function testMessageFactory(string $file, string $class): void { $document = DOMDocumentFactory::fromFile($file); diff --git a/tests/SAML2/XML/samlp/NameIDPolicyTest.php b/tests/SAML2/XML/samlp/NameIDPolicyTest.php index 949d8b15d..b4af250de 100644 --- a/tests/SAML2/XML/samlp/NameIDPolicyTest.php +++ b/tests/SAML2/XML/samlp/NameIDPolicyTest.php @@ -4,8 +4,10 @@ namespace SimpleSAML\Test\SAML2\XML\samlp; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use SimpleSAML\SAML2\Constants as C; +use SimpleSAML\SAML2\XML\samlp\AbstractSamlpElement; use SimpleSAML\SAML2\XML\samlp\NameIDPolicy; use SimpleSAML\XML\DOMDocumentFactory; use SimpleSAML\XML\TestUtils\ArrayizableElementTestTrait; @@ -16,13 +18,12 @@ use function strval; /** - * Class \SAML2\XML\md\NameIDPolicyTest - * - * @covers \SimpleSAML\SAML2\XML\samlp\NameIDPolicy - * @covers \SimpleSAML\SAML2\XML\samlp\AbstractSamlpElement + * Class \SimpleSAML\SAML2\XML\md\NameIDPolicyTest * * @package simplesamlphp/saml2 */ +#[CoversClass(NameIDPolicy::class)] +#[CoversClass(AbstractSamlpElement::class)] final class NameIDPolicyTest extends TestCase { use ArrayizableElementTestTrait; diff --git a/tests/SAML2/XML/samlp/RequestedAuthnContextTest.php b/tests/SAML2/XML/samlp/RequestedAuthnContextTest.php index ff10d4d99..de87fd19d 100644 --- a/tests/SAML2/XML/samlp/RequestedAuthnContextTest.php +++ b/tests/SAML2/XML/samlp/RequestedAuthnContextTest.php @@ -4,12 +4,14 @@ namespace SimpleSAML\Test\SAML2\XML\samlp; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use SimpleSAML\Assert\AssertionFailedException; use SimpleSAML\SAML2\Constants as C; use SimpleSAML\SAML2\XML\Comparison; use SimpleSAML\SAML2\XML\saml\AuthnContextClassRef; use SimpleSAML\SAML2\XML\saml\AuthnContextDeclRef; +use SimpleSAML\SAML2\XML\samlp\AbstractSamlpElement; use SimpleSAML\SAML2\XML\samlp\RequestedAuthnContext; use SimpleSAML\XML\DOMDocumentFactory; use SimpleSAML\XML\TestUtils\SchemaValidationTestTrait; @@ -19,12 +21,12 @@ use function strval; /** - * Class \SAML2\XML\samlp\RequestedAuthnContextTest + * Class \SimpleSAML\SAML2\XML\samlp\RequestedAuthnContextTest * - * @covers \SimpleSAML\SAML2\XML\samlp\RequestedAuthnContext - * @covers \SimpleSAML\SAML2\XML\samlp\AbstractSamlpElement * @package simplesamlphp/saml2 */ +#[CoversClass(RequestedAuthnContext::class)] +#[CoversClass(AbstractSamlpElement::class)] final class RequestedAuthnContextTest extends TestCase { use SchemaValidationTestTrait; diff --git a/tests/SAML2/XML/samlp/RequesterIDTest.php b/tests/SAML2/XML/samlp/RequesterIDTest.php index 98fa27bd1..3b50ab990 100644 --- a/tests/SAML2/XML/samlp/RequesterIDTest.php +++ b/tests/SAML2/XML/samlp/RequesterIDTest.php @@ -4,7 +4,9 @@ namespace SimpleSAML\SAML2\Test\SAML2\XML\samlp; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; +use SimpleSAML\SAML2\XML\samlp\AbstractSamlpElement; use SimpleSAML\SAML2\XML\samlp\RequesterID; use SimpleSAML\XML\DOMDocumentFactory; use SimpleSAML\XML\TestUtils\SchemaValidationTestTrait; @@ -16,11 +18,10 @@ /** * Class \SimpleSAML\SAML2\XML\samlp\RequesterIDTest * - * @covers \SimpleSAML\SAML2\XML\samlp\RequesterID - * @covers \SimpleSAML\SAML2\XML\samlp\AbstractSamlpElement - * * @package simplesamlphp/saml2 */ +#[CoversClass(RequesterID::class)] +#[CoversClass(AbstractSamlpElement::class)] final class RequesterIDTest extends TestCase { use SchemaValidationTestTrait; diff --git a/tests/SAML2/XML/samlp/ResponseTest.php b/tests/SAML2/XML/samlp/ResponseTest.php index 7d3a238fb..2ee181bfe 100644 --- a/tests/SAML2/XML/samlp/ResponseTest.php +++ b/tests/SAML2/XML/samlp/ResponseTest.php @@ -5,10 +5,14 @@ namespace SimpleSAML\Test\SAML2\XML\samlp; use DateTimeImmutable; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use SimpleSAML\SAML2\Constants as C; use SimpleSAML\SAML2\XML\saml\Assertion; use SimpleSAML\SAML2\XML\saml\Issuer; +use SimpleSAML\SAML2\XML\samlp\AbstractMessage; +use SimpleSAML\SAML2\XML\samlp\AbstractSamlpElement; +use SimpleSAML\SAML2\XML\samlp\AbstractStatusResponse; use SimpleSAML\SAML2\XML\samlp\Response; use SimpleSAML\SAML2\XML\samlp\Status; use SimpleSAML\SAML2\XML\samlp\StatusCode; @@ -21,14 +25,14 @@ use function strval; /** - * Class \SAML2\XML\samlp\ResponseTest + * Class \SimpleSAML\SAML2\XML\samlp\ResponseTest * - * @covers \SimpleSAML\SAML2\XML\samlp\Response - * @covers \SimpleSAML\SAML2\XML\samlp\AbstractStatusResponse - * @covers \SimpleSAML\SAML2\XML\samlp\AbstractMessage - * @covers \SimpleSAML\SAML2\XML\samlp\AbstractSamlpElement * @package simplesamlphp/saml2 */ +#[CoversClass(Response::class)] +#[CoversClass(AbstractStatusResponse::class)] +#[CoversClass(AbstractMessage::class)] +#[CoversClass(AbstractSamlpElement::class)] final class ResponseTest extends TestCase { use SchemaValidationTestTrait; diff --git a/tests/SAML2/XML/samlp/ScopingTest.php b/tests/SAML2/XML/samlp/ScopingTest.php index dc12f3a92..7311cf85d 100644 --- a/tests/SAML2/XML/samlp/ScopingTest.php +++ b/tests/SAML2/XML/samlp/ScopingTest.php @@ -4,9 +4,11 @@ namespace SimpleSAML\Test\SAML2\XML\samlp; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use SimpleSAML\SAML2\Constants as C; use SimpleSAML\SAML2\Utils\XPath; +use SimpleSAML\SAML2\XML\samlp\AbstractSamlpElement; use SimpleSAML\SAML2\XML\samlp\GetComplete; use SimpleSAML\SAML2\XML\samlp\IDPEntry; use SimpleSAML\SAML2\XML\samlp\IDPList; @@ -20,13 +22,12 @@ use function strval; /** - * Class \SAML2\XML\samlp\ScopingTest - * - * @covers \SimpleSAML\SAML2\XML\samlp\Scoping - * @covers \SimpleSAML\SAML2\XML\samlp\AbstractSamlpElement + * Class \SimpleSAML\SAML2\XML\samlp\ScopingTest * * @package simplesamlphp/saml2 */ +#[CoversClass(Scoping::class)] +#[CoversClass(AbstractSamlpElement::class)] final class ScopingTest extends TestCase { use SchemaValidationTestTrait; diff --git a/tests/SAML2/XML/samlp/SessionIndexTest.php b/tests/SAML2/XML/samlp/SessionIndexTest.php index a717d8c22..f1235606e 100644 --- a/tests/SAML2/XML/samlp/SessionIndexTest.php +++ b/tests/SAML2/XML/samlp/SessionIndexTest.php @@ -4,7 +4,9 @@ namespace SimpleSAML\SAML2\Test\SAML2\XML\samlp; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; +use SimpleSAML\SAML2\XML\samlp\AbstractSamlpElement; use SimpleSAML\SAML2\XML\samlp\SessionIndex; use SimpleSAML\XML\DOMDocumentFactory; use SimpleSAML\XML\TestUtils\SchemaValidationTestTrait; @@ -16,11 +18,10 @@ /** * Class \SimpleSAML\SAML2\XML\samlp\SessionIndexTest * - * @covers \SimpleSAML\SAML2\XML\samlp\SessionIndex - * @covers \SimpleSAML\SAML2\XML\samlp\AbstractSamlpElement - * * @package simplesamlphp/saml2 */ +#[CoversClass(SessionIndex::class)] +#[CoversClass(AbstractSamlpElement::class)] final class SessionIndexTest extends TestCase { use SchemaValidationTestTrait; diff --git a/tests/SAML2/XML/samlp/StatusCodeTest.php b/tests/SAML2/XML/samlp/StatusCodeTest.php index 820a91598..c9a3f2e96 100644 --- a/tests/SAML2/XML/samlp/StatusCodeTest.php +++ b/tests/SAML2/XML/samlp/StatusCodeTest.php @@ -4,8 +4,10 @@ namespace SimpleSAML\Test\SAML2\XML\samlp; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use SimpleSAML\SAML2\Constants as C; +use SimpleSAML\SAML2\XML\samlp\AbstractSamlpElement; use SimpleSAML\SAML2\XML\samlp\StatusCode; use SimpleSAML\XML\DOMDocumentFactory; use SimpleSAML\XML\TestUtils\SchemaValidationTestTrait; @@ -15,13 +17,12 @@ use function strval; /** - * Class \SAML2\XML\samlp\StatusCodeTest - * - * @covers \SimpleSAML\SAML2\XML\samlp\StatusCode - * @covers \SimpleSAML\SAML2\XML\samlp\AbstractSamlpElement + * Class \SimpleSAML\SAML2\XML\samlp\StatusCodeTest * * @package simplesamlphp/saml2 */ +#[CoversClass(StatusCode::class)] +#[CoversClass(AbstractSamlpElement::class)] final class StatusCodeTest extends TestCase { use SchemaValidationTestTrait; diff --git a/tests/SAML2/XML/samlp/StatusDetailTest.php b/tests/SAML2/XML/samlp/StatusDetailTest.php index bd08cd8bb..bd5089a23 100644 --- a/tests/SAML2/XML/samlp/StatusDetailTest.php +++ b/tests/SAML2/XML/samlp/StatusDetailTest.php @@ -4,8 +4,10 @@ namespace SimpleSAML\Test\SAML2\XML\samlp; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use SimpleSAML\SAML2\Constants as C; +use SimpleSAML\SAML2\XML\samlp\AbstractSamlpElement; use SimpleSAML\SAML2\XML\samlp\StatusDetail; use SimpleSAML\XML\Chunk; use SimpleSAML\XML\DOMDocumentFactory; @@ -16,13 +18,12 @@ use function strval; /** - * Class \SAML2\XML\samlp\StatusDetailTest - * - * @covers \SimpleSAML\SAML2\XML\samlp\StatusDetail - * @covers \SimpleSAML\SAML2\XML\samlp\AbstractSamlpElement + * Class \SimpleSAML\SAML2\XML\samlp\StatusDetailTest * * @package simplesamlphp/saml2 */ +#[CoversClass(StatusDetail::class)] +#[CoversClass(AbstractSamlpElement::class)] final class StatusDetailTest extends TestCase { use SchemaValidationTestTrait; diff --git a/tests/SAML2/XML/samlp/StatusMessageTest.php b/tests/SAML2/XML/samlp/StatusMessageTest.php index 62d31d23c..0dd5387f6 100644 --- a/tests/SAML2/XML/samlp/StatusMessageTest.php +++ b/tests/SAML2/XML/samlp/StatusMessageTest.php @@ -4,7 +4,9 @@ namespace SimpleSAML\SAML2\Test\SAML2\XML\samlp; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; +use SimpleSAML\SAML2\XML\samlp\AbstractSamlpElement; use SimpleSAML\SAML2\XML\samlp\StatusMessage; use SimpleSAML\XML\DOMDocumentFactory; use SimpleSAML\XML\TestUtils\SchemaValidationTestTrait; @@ -21,6 +23,8 @@ * * @package simplesamlphp/saml2 */ +#[CoversClass(StatusMessage::class)] +#[CoversClass(AbstractSamlpElement::class)] final class StatusMessageTest extends TestCase { use SchemaValidationTestTrait; diff --git a/tests/SAML2/XML/samlp/StatusTest.php b/tests/SAML2/XML/samlp/StatusTest.php index 8bf13aa66..76771d54e 100644 --- a/tests/SAML2/XML/samlp/StatusTest.php +++ b/tests/SAML2/XML/samlp/StatusTest.php @@ -5,9 +5,11 @@ namespace SimpleSAML\Test\SAML2\XML\samlp; use DOMDocument; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use SimpleSAML\SAML2\Constants as C; use SimpleSAML\SAML2\Utils\XPath; +use SimpleSAML\SAML2\XML\samlp\AbstractSamlpElement; use SimpleSAML\SAML2\XML\samlp\Status; use SimpleSAML\SAML2\XML\samlp\StatusCode; use SimpleSAML\SAML2\XML\samlp\StatusDetail; @@ -21,13 +23,12 @@ use function strval; /** - * Class \SAML2\XML\samlp\StatusTest - * - * @covers \SimpleSAML\SAML2\XML\samlp\Status - * @covers \SimpleSAML\SAML2\XML\samlp\AbstractSamlpElement + * Class \SimpleSAML\SAML2\XML\samlp\StatusTest * * @package simplesamlphp/saml2 */ +#[CoversClass(Status::class)] +#[CoversClass(AbstractSamlpElement::class)] final class StatusTest extends TestCase { use SchemaValidationTestTrait; diff --git a/tests/SAML2/XML/shibmd/KeyAuthorityTest.php b/tests/SAML2/XML/shibmd/KeyAuthorityTest.php index 029277efb..4feca89b5 100644 --- a/tests/SAML2/XML/shibmd/KeyAuthorityTest.php +++ b/tests/SAML2/XML/shibmd/KeyAuthorityTest.php @@ -4,7 +4,9 @@ namespace SimpleSAML\Test\SAML2\XML\shibmd; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; +use SimpleSAML\SAML2\XML\shibmd\AbstractShibmdElement; use SimpleSAML\SAML2\XML\shibmd\KeyAuthority; use SimpleSAML\XML\Attribute as XMLAttribute; use SimpleSAML\XML\DOMDocumentFactory; @@ -20,10 +22,10 @@ /** * Class \SimpleSAML\SAML2\XML\shibmd\KeyAuthority * - * @covers \SimpleSAML\SAML2\XML\shibmd\KeyAuthority - * @covers \SimpleSAML\SAML2\XML\shibmd\AbstractShibmdElement * @package simplesamlphp/saml2 */ +#[CoversClass(KeyAuthority::class)] +#[CoversClass(AbstractShibmdElement::class)] final class KeyAuthorityTest extends TestCase { use SchemaValidationTestTrait; diff --git a/tests/SAML2/XML/shibmd/ScopeTest.php b/tests/SAML2/XML/shibmd/ScopeTest.php index 514801578..b69ceb51d 100644 --- a/tests/SAML2/XML/shibmd/ScopeTest.php +++ b/tests/SAML2/XML/shibmd/ScopeTest.php @@ -4,8 +4,10 @@ namespace SimpleSAML\Test\SAML2\XML\shibmd; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use SimpleSAML\SAML2\Utils\XPath; +use SimpleSAML\SAML2\XML\shibmd\AbstractShibmdElement; use SimpleSAML\SAML2\XML\shibmd\Scope; use SimpleSAML\XML\DOMDocumentFactory; use SimpleSAML\XML\TestUtils\SchemaValidationTestTrait; @@ -17,10 +19,10 @@ /** * Class \SimpleSAML\SAML2\XML\shibmd\Scope * - * @covers \SimpleSAML\SAML2\XML\shibmd\Scope - * @covers \SimpleSAML\SAML2\XML\shibmd\AbstractShibmdElement * @package simplesamlphp/saml2 */ +#[CoversClass(Scope::class)] +#[CoversClass(AbstractShibmdElement::class)] final class ScopeTest extends TestCase { use SchemaValidationTestTrait;