From 06604cfb37d1ffa8dd7018951d57b436ea09de73 Mon Sep 17 00:00:00 2001 From: Tim van Dijen Date: Tue, 30 Apr 2024 23:53:53 +0200 Subject: [PATCH] Migrate phpunit metadata to attributes --- tests/src/Controller/DiscoPowerTest.php | 4 ++-- tests/src/PowerIdPDiscoTest.php | 9 ++------- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/tests/src/Controller/DiscoPowerTest.php b/tests/src/Controller/DiscoPowerTest.php index 5ef3e36..b1f86bd 100644 --- a/tests/src/Controller/DiscoPowerTest.php +++ b/tests/src/Controller/DiscoPowerTest.php @@ -4,6 +4,7 @@ namespace SimpleSAML\Test\Module\discopower\Controller; +use PHPUnit\Framework\Attributes\CoversClass; use SimpleSAML\Configuration; use SimpleSAML\Error; use SimpleSAML\HTTP\RunnableResponse; @@ -14,9 +15,8 @@ /** * Set of tests for the controllers in the "discopwer" module. - * - * @covers \SimpleSAML\Module\discopower\Controller\DiscoPower */ +#[CoversClass(Controller\DiscoPower::class)] class DiscoPowerTest extends ClearStateTestCase { /** @var \SimpleSAML\Configuration */ diff --git a/tests/src/PowerIdPDiscoTest.php b/tests/src/PowerIdPDiscoTest.php index 33fe6ab..3b1046c 100644 --- a/tests/src/PowerIdPDiscoTest.php +++ b/tests/src/PowerIdPDiscoTest.php @@ -4,12 +4,14 @@ namespace SimpleSAML\Test\Module\discopower; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use ReflectionClass; use SimpleSAML\Configuration; use SimpleSAML\Metadata\MetaDataStorageHandler; use SimpleSAML\Module\discopower\PowerIdPDisco; +#[CoversClass(PowerIdPDisco::Class)] class PowerIdPDiscoTest extends TestCase { /** @var \SimpleSAML\Module\discopower\PowerIdPDisco */ @@ -53,8 +55,6 @@ public static function setUpBeforeClass(): void } /** - * @covers \SimpleSAML\Module\discopower\PowerIdPDisco - * @covers \SimpleSAML\Module\discopower\PowerIdPDisco::__construct */ public function testPowerIdPDisco(): void { @@ -62,7 +62,6 @@ public function testPowerIdPDisco(): void } /** - * @covers \SimpleSAML\Module\discopower\PowerIdPDisco::getIdPList */ public function testGetIdPList(): void { @@ -75,9 +74,6 @@ public function testGetIdPList(): void } /** - * @covers \SimpleSAML\Module\discopower\PowerIdPDisco::idplistStructured - * @covers \SimpleSAML\Module\discopower\PowerIdPDisco::getIdPList - * @covers \SimpleSAML\Module\discopower\PowerIdPDisco::mcmp */ public function testIdplistStructured(): void { @@ -137,7 +133,6 @@ public function testIdplistStructured(): void } /** - * @covers \SimpleSAML\Module\discopower\PowerIdPDisco::mcmp */ public function testmcmp(): void {