diff --git a/tests/Controller/ApiControllerTest.php b/tests/Controller/ApiControllerTest.php index 6a61953..2cdbc31 100755 --- a/tests/Controller/ApiControllerTest.php +++ b/tests/Controller/ApiControllerTest.php @@ -33,10 +33,10 @@ use phpOMS\Router\WebRouter; use phpOMS\Utils\TestUtils; /** - * @testdox Modules\Draw\tests\Controller\ApiControllerTest: Draw api controller - * * @internal */ +#[\PHPUnit\Framework\Attributes\CoversClass(\Modules\Draw\Controller\ApiController::class)] +#[\PHPUnit\Framework\Attributes\TestDox('Modules\Draw\tests\Controller\ApiControllerTest: Draw api controller')] final class ApiControllerTest extends \PHPUnit\Framework\TestCase { protected ApplicationAbstract $app; @@ -91,10 +91,7 @@ final class ApiControllerTest extends \PHPUnit\Framework\TestCase TestUtils::setMember($this->module, 'app', $this->app); } - /** - * @covers \Modules\Draw\Controller\ApiController - * @group module - */ + #[\PHPUnit\Framework\Attributes\Group('module')] public function testCreateDraw() : void { $response = new HttpResponse(); @@ -110,10 +107,7 @@ final class ApiControllerTest extends \PHPUnit\Framework\TestCase self::assertGreaterThan(0, $response->getDataArray('')['response']->id); } - /** - * @covers \Modules\Draw\Controller\ApiController - * @group module - */ + #[\PHPUnit\Framework\Attributes\Group('module')] public function testApiDrawCreateInvalidData() : void { $response = new HttpResponse(); diff --git a/tests/Models/DrawImageTest.php b/tests/Models/DrawImageTest.php index bd6b2ec..158793f 100755 --- a/tests/Models/DrawImageTest.php +++ b/tests/Models/DrawImageTest.php @@ -20,6 +20,7 @@ use Modules\Media\Models\Media; /** * @internal */ +#[\PHPUnit\Framework\Attributes\CoversClass(\Modules\Draw\Models\DrawImage::class)] final class DrawImageTest extends \PHPUnit\Framework\TestCase { private DrawImage $img; @@ -32,30 +33,21 @@ final class DrawImageTest extends \PHPUnit\Framework\TestCase $this->img = new DrawImage(); } - /** - * @covers \Modules\Draw\Models\DrawImage - * @group module - */ + #[\PHPUnit\Framework\Attributes\Group('module')] public function testDefault() : void { self::assertEquals(0, $this->img->id); self::assertNull($this->img->media); } - /** - * @covers \Modules\Draw\Models\DrawImage - * @group module - */ + #[\PHPUnit\Framework\Attributes\Group('module')] public function testFromMedia() : void { $img = DrawImage::fromMedia($temp = new Media()); self::assertEquals($temp, $img->media); } - /** - * @covers \Modules\Draw\Models\DrawImage - * @group module - */ + #[\PHPUnit\Framework\Attributes\Group('module')] public function testSerialize() : void { self::assertEquals( diff --git a/tests/Models/NullDrawImageTest.php b/tests/Models/NullDrawImageTest.php index 8b6e335..afbb3cb 100755 --- a/tests/Models/NullDrawImageTest.php +++ b/tests/Models/NullDrawImageTest.php @@ -19,31 +19,23 @@ use Modules\Draw\Models\NullDrawImage; /** * @internal */ +#[\PHPUnit\Framework\Attributes\CoversClass(\Modules\Draw\Models\NullDrawImage::class)] final class NullDrawImageTest extends \PHPUnit\Framework\TestCase { - /** - * @covers \Modules\Draw\Models\NullDrawImage - * @group module - */ + #[\PHPUnit\Framework\Attributes\Group('module')] public function testNull() : void { self::assertInstanceOf('\Modules\Draw\Models\DrawImage', new NullDrawImage()); } - /** - * @covers \Modules\Draw\Models\NullDrawImage - * @group module - */ + #[\PHPUnit\Framework\Attributes\Group('module')] public function testId() : void { $null = new NullDrawImage(2); self::assertEquals(2, $null->id); } - /** - * @covers \Modules\Draw\Models\NullDrawImage - * @group module - */ + #[\PHPUnit\Framework\Attributes\Group('module')] public function testJsonSerialize() : void { $null = new NullDrawImage(2); diff --git a/tests/phpunit_default.xml b/tests/phpunit_default.xml index d350430..e4a5639 100755 --- a/tests/phpunit_default.xml +++ b/tests/phpunit_default.xml @@ -1,31 +1,6 @@ - - - - ../ - - - ../vendor* - ../MainRepository* - ../Karaka* - ../Admin/Install/Application* - ../phpOMS* - ../tests* - ../*/tests* - ../**/tests* - */tests* - ../* - ../* - ../* - ../* - ../* - ../**/test* - ../**/Theme* - ../**/Admin/Routes* - ../**/Admin/Hooks* - ../**/Admin/Install* - ../Media/Files* - + + @@ -56,4 +31,31 @@ + + + ../ + + + ../vendor* + ../MainRepository* + ../Karaka* + ../Admin/Install/Application* + ../phpOMS* + ../tests* + ../*/tests* + ../**/tests* + */tests* + ../* + ../* + ../* + ../* + ../* + ../**/test* + ../**/Theme* + ../**/Admin/Routes* + ../**/Admin/Hooks* + ../**/Admin/Install* + ../Media/Files* + +