diff --git a/tests/Controller/Api/ApiControllerAttributeTrait.php b/tests/Controller/Api/ApiControllerAttributeTrait.php index 52fd50b..442376b 100755 --- a/tests/Controller/Api/ApiControllerAttributeTrait.php +++ b/tests/Controller/Api/ApiControllerAttributeTrait.php @@ -24,8 +24,8 @@ trait ApiControllerAttributeTrait { /** * @covers \Modules\SupplierManagement\Controller\ApiController - * @group module */ + #[\PHPUnit\Framework\Attributes\Group('module')] public function testApiSupplierAttributeTypeCreate() : void { $response = new HttpResponse(); @@ -42,8 +42,8 @@ trait ApiControllerAttributeTrait /** * @covers \Modules\SupplierManagement\Controller\ApiController - * @group module */ + #[\PHPUnit\Framework\Attributes\Group('module')] public function testApiSupplierAttributeTypeL11nCreate() : void { $response = new HttpResponse(); @@ -60,8 +60,8 @@ trait ApiControllerAttributeTrait /** * @covers \Modules\SupplierManagement\Controller\ApiController - * @group module */ + #[\PHPUnit\Framework\Attributes\Group('module')] public function testApiSupplierAttributeValueIntCreate() : void { $response = new HttpResponse(); @@ -80,8 +80,8 @@ trait ApiControllerAttributeTrait /** * @covers \Modules\SupplierManagement\Controller\ApiController - * @group module */ + #[\PHPUnit\Framework\Attributes\Group('module')] public function testApiSupplierAttributeValueStrCreate() : void { $response = new HttpResponse(); @@ -99,8 +99,8 @@ trait ApiControllerAttributeTrait /** * @covers \Modules\SupplierManagement\Controller\ApiController - * @group module */ + #[\PHPUnit\Framework\Attributes\Group('module')] public function testApiSupplierAttributeValueFloatCreate() : void { $response = new HttpResponse(); @@ -118,8 +118,8 @@ trait ApiControllerAttributeTrait /** * @covers \Modules\SupplierManagement\Controller\ApiController - * @group module */ + #[\PHPUnit\Framework\Attributes\Group('module')] public function testApiSupplierAttributeValueDatCreate() : void { $response = new HttpResponse(); @@ -137,8 +137,8 @@ trait ApiControllerAttributeTrait /** * @covers \Modules\SupplierManagement\Controller\ApiController - * @group module */ + #[\PHPUnit\Framework\Attributes\Group('module')] public function testApiSupplierAttributeCreate() : void { $response = new HttpResponse(); @@ -155,8 +155,8 @@ trait ApiControllerAttributeTrait /** * @covers \Modules\SupplierManagement\Controller\ApiController - * @group module */ + #[\PHPUnit\Framework\Attributes\Group('module')] public function testApiSupplierAttributeValueCreateInvalidData() : void { $response = new HttpResponse(); @@ -171,8 +171,8 @@ trait ApiControllerAttributeTrait /** * @covers \Modules\SupplierManagement\Controller\ApiController - * @group module */ + #[\PHPUnit\Framework\Attributes\Group('module')] public function testApiSupplierAttributeTypeCreateInvalidData() : void { $response = new HttpResponse(); @@ -187,8 +187,8 @@ trait ApiControllerAttributeTrait /** * @covers \Modules\SupplierManagement\Controller\ApiController - * @group module */ + #[\PHPUnit\Framework\Attributes\Group('module')] public function testApiSupplierAttributeTypeL11nCreateInvalidData() : void { $response = new HttpResponse(); @@ -203,8 +203,8 @@ trait ApiControllerAttributeTrait /** * @covers \Modules\SupplierManagement\Controller\ApiController - * @group module */ + #[\PHPUnit\Framework\Attributes\Group('module')] public function testApiSupplierAttributeCreateInvalidData() : void { $response = new HttpResponse(); diff --git a/tests/Controller/Api/ApiControllerSupplierTrait.php b/tests/Controller/Api/ApiControllerSupplierTrait.php index e0b26ca..42c0155 100755 --- a/tests/Controller/Api/ApiControllerSupplierTrait.php +++ b/tests/Controller/Api/ApiControllerSupplierTrait.php @@ -36,8 +36,8 @@ trait ApiControllerSupplierTrait /** * @covers \Modules\SupplierManagement\Controller\ApiController - * @group module */ + #[\PHPUnit\Framework\Attributes\Group('module')] public function testApiSupplierCreate() : void { $response = new HttpResponse(); @@ -59,8 +59,8 @@ trait ApiControllerSupplierTrait /** * @covers \Modules\SupplierManagement\Controller\ApiController - * @group module */ + #[\PHPUnit\Framework\Attributes\Group('module')] public function testApiSupplierCreateInvalidData() : void { $response = new HttpResponse(); @@ -75,8 +75,8 @@ trait ApiControllerSupplierTrait /** * @covers \Modules\SupplierManagement\Controller\ApiController - * @group module */ + #[\PHPUnit\Framework\Attributes\Group('module')] public function testApiSupplierProfileImageCreate() : void { $response = new HttpResponse(); @@ -106,8 +106,8 @@ trait ApiControllerSupplierTrait /** * @covers \Modules\SupplierManagement\Controller\ApiController - * @group module */ + #[\PHPUnit\Framework\Attributes\Group('module')] public function testApiSupplierFileCreate() : void { $response = new HttpResponse(); @@ -136,8 +136,8 @@ trait ApiControllerSupplierTrait /** * @covers \Modules\SupplierManagement\Controller\ApiController - * @group module */ + #[\PHPUnit\Framework\Attributes\Group('module')] public function testApiSupplierNoteCreate() : void { $response = new HttpResponse(); @@ -157,8 +157,8 @@ trait ApiControllerSupplierTrait /** * @covers \Modules\SupplierManagement\Controller\ApiController - * @group module */ + #[\PHPUnit\Framework\Attributes\Group('module')] public function testApiFileCreateInvalidData() : void { $response = new HttpResponse(); diff --git a/tests/Controller/ApiControllerTest.php b/tests/Controller/ApiControllerTest.php index 3bd15f4..6d5d0ad 100755 --- a/tests/Controller/ApiControllerTest.php +++ b/tests/Controller/ApiControllerTest.php @@ -32,10 +32,9 @@ use phpOMS\Router\WebRouter; use phpOMS\Utils\TestUtils; /** - * @testdox Modules\SupplierManagement\tests\Controller\ApiControllerTest: SupplierManagement api controller - * * @internal */ +#[\PHPUnit\Framework\Attributes\TestDox('Modules\SupplierManagement\tests\Controller\ApiControllerTest: SupplierManagement api controller')] final class ApiControllerTest extends \PHPUnit\Framework\TestCase { protected ApplicationAbstract $app; diff --git a/tests/Models/NullSupplierTest.php b/tests/Models/NullSupplierTest.php index 79e9e72..b9bbc32 100755 --- a/tests/Models/NullSupplierTest.php +++ b/tests/Models/NullSupplierTest.php @@ -19,31 +19,23 @@ use Modules\SupplierManagement\Models\NullSupplier; /** * @internal */ +#[\PHPUnit\Framework\Attributes\CoversClass(\Modules\SupplierManagement\Models\NullSupplier::class)] final class NullSupplierTest extends \PHPUnit\Framework\TestCase { - /** - * @covers \Modules\SupplierManagement\Models\NullSupplier - * @group module - */ + #[\PHPUnit\Framework\Attributes\Group('module')] public function testNull() : void { self::assertInstanceOf('\Modules\SupplierManagement\Models\Supplier', new NullSupplier()); } - /** - * @covers \Modules\SupplierManagement\Models\NullSupplier - * @group module - */ + #[\PHPUnit\Framework\Attributes\Group('module')] public function testId() : void { $null = new NullSupplier(2); self::assertEquals(2, $null->id); } - /** - * @covers \Modules\SupplierManagement\Models\NullSupplier - * @group module - */ + #[\PHPUnit\Framework\Attributes\Group('module')] public function testJsonSerialize() : void { $null = new NullSupplier(2); diff --git a/tests/Models/SupplierTest.php b/tests/Models/SupplierTest.php index 1c460f0..339d7d3 100755 --- a/tests/Models/SupplierTest.php +++ b/tests/Models/SupplierTest.php @@ -22,6 +22,7 @@ use Modules\SupplierManagement\Models\SupplierStatus; /** * @internal */ +#[\PHPUnit\Framework\Attributes\CoversClass(\Modules\SupplierManagement\Models\Supplier::class)] final class SupplierTest extends \PHPUnit\Framework\TestCase { private Supplier $supplier; @@ -34,10 +35,7 @@ final class SupplierTest extends \PHPUnit\Framework\TestCase $this->supplier = new Supplier(); } - /** - * @covers \Modules\SupplierManagement\Models\Supplier - * @group module - */ + #[\PHPUnit\Framework\Attributes\Group('module')] public function testDefault() : void { self::assertEquals(0, $this->supplier->id); @@ -55,10 +53,7 @@ final class SupplierTest extends \PHPUnit\Framework\TestCase self::assertInstanceOf('\phpOMS\Stdlib\Base\Address', $this->supplier->mainAddress); } - /** - * @covers \Modules\SupplierManagement\Models\Supplier - * @group module - */ + #[\PHPUnit\Framework\Attributes\Group('module')] public function testContactElementInputOutput() : void { $this->supplier->addContactElement($temp = new ContactElement()); @@ -66,20 +61,14 @@ final class SupplierTest extends \PHPUnit\Framework\TestCase self::assertEquals($temp, $this->supplier->getMainContactElement(0)); } - /** - * @covers \Modules\SupplierManagement\Models\Supplier - * @group module - */ + #[\PHPUnit\Framework\Attributes\Group('module')] public function testNoteInputOutput() : void { $this->supplier->addNote(new EditorDoc()); self::assertCount(1, $this->supplier->getNotes()); } - /** - * @covers \Modules\SupplierManagement\Models\Supplier - * @group module - */ + #[\PHPUnit\Framework\Attributes\Group('module')] public function testSerialize() : void { $this->supplier->number = '123456'; 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* + +