diff --git a/tests/Admin/AdminTest.php b/tests/Admin/AdminTest.php index 88d53e1..510e74e 100755 --- a/tests/Admin/AdminTest.php +++ b/tests/Admin/AdminTest.php @@ -17,7 +17,7 @@ namespace Modules\Accounting\tests\Admin; /** * @internal */ -final class AccountingTest extends \PHPUnit\Framework\TestCase +final class AdminTest extends \PHPUnit\Framework\TestCase { protected const NAME = 'Accounting'; diff --git a/tests/Controller/Api/ApiControllerAccountTrait.php b/tests/Controller/Api/ApiControllerAccountTrait.php index ef7c165..c0f3dda 100755 --- a/tests/Controller/Api/ApiControllerAccountTrait.php +++ b/tests/Controller/Api/ApiControllerAccountTrait.php @@ -22,8 +22,8 @@ trait ApiControllerAccountTrait { /** * @covers \Modules\Accounting\Controller\ApiController - * @group module */ + #[\PHPUnit\Framework\Attributes\Group('module')] public function testApiAccountCreate() : void { $response = new HttpResponse(); @@ -40,8 +40,8 @@ trait ApiControllerAccountTrait /** * @covers \Modules\Accounting\Controller\ApiController - * @group module */ + #[\PHPUnit\Framework\Attributes\Group('module')] public function testApiAccountCreateInvalid() : void { $response = new HttpResponse(); @@ -56,8 +56,8 @@ trait ApiControllerAccountTrait /** * @covers \Modules\Accounting\Controller\ApiController - * @group module */ + #[\PHPUnit\Framework\Attributes\Group('module')] public function testApiAccountUpdate() : void { $response = new HttpResponse(); @@ -74,8 +74,8 @@ trait ApiControllerAccountTrait /** * @covers \Modules\Accounting\Controller\ApiController - * @group module */ + #[\PHPUnit\Framework\Attributes\Group('module')] public function testApiAccountUpdateInvalid() : void { $response = new HttpResponse(); diff --git a/tests/Controller/Api/ApiControllerBatchEntryTrait.php b/tests/Controller/Api/ApiControllerBatchEntryTrait.php index 3dcf1e8..ec83b09 100755 --- a/tests/Controller/Api/ApiControllerBatchEntryTrait.php +++ b/tests/Controller/Api/ApiControllerBatchEntryTrait.php @@ -22,8 +22,8 @@ trait ApiControllerBatchEntryTrait { /** * @covers \Modules\Accounting\Controller\ApiController - * @group module */ + #[\PHPUnit\Framework\Attributes\Group('module')] public function testApiBatchEntryCreate() : void { $response = new HttpResponse(); @@ -40,8 +40,8 @@ trait ApiControllerBatchEntryTrait /** * @covers \Modules\Accounting\Controller\ApiController - * @group module */ + #[\PHPUnit\Framework\Attributes\Group('module')] public function testApiBatchEntryCreateInvalid() : void { $response = new HttpResponse(); @@ -56,8 +56,8 @@ trait ApiControllerBatchEntryTrait /** * @covers \Modules\Accounting\Controller\ApiController - * @group module */ + #[\PHPUnit\Framework\Attributes\Group('module')] public function testApiBatchEntryUpdate() : void { $response = new HttpResponse(); @@ -74,8 +74,8 @@ trait ApiControllerBatchEntryTrait /** * @covers \Modules\Accounting\Controller\ApiController - * @group module */ + #[\PHPUnit\Framework\Attributes\Group('module')] public function testApiBatchEntryUpdateInvalid() : void { $response = new HttpResponse(); @@ -90,8 +90,8 @@ trait ApiControllerBatchEntryTrait /** * @covers \Modules\Accounting\Controller\ApiController - * @group module */ + #[\PHPUnit\Framework\Attributes\Group('module')] public function testApiRecurringEntryCreate() : void { $response = new HttpResponse(); @@ -108,8 +108,8 @@ trait ApiControllerBatchEntryTrait /** * @covers \Modules\Accounting\Controller\ApiController - * @group module */ + #[\PHPUnit\Framework\Attributes\Group('module')] public function testApiRecurringEntryCreateInvalid() : void { $response = new HttpResponse(); @@ -124,8 +124,8 @@ trait ApiControllerBatchEntryTrait /** * @covers \Modules\Accounting\Controller\ApiController - * @group module */ + #[\PHPUnit\Framework\Attributes\Group('module')] public function testApiRecurringEntryUpdate() : void { $response = new HttpResponse(); @@ -142,8 +142,8 @@ trait ApiControllerBatchEntryTrait /** * @covers \Modules\Accounting\Controller\ApiController - * @group module */ + #[\PHPUnit\Framework\Attributes\Group('module')] public function testApiRecurringEntryUpdateInvalid() : void { $response = new HttpResponse(); diff --git a/tests/Controller/Api/ApiControllerCostCenterTrait.php b/tests/Controller/Api/ApiControllerCostCenterTrait.php index fad68c8..e6adfbd 100755 --- a/tests/Controller/Api/ApiControllerCostCenterTrait.php +++ b/tests/Controller/Api/ApiControllerCostCenterTrait.php @@ -22,8 +22,8 @@ trait ApiControllerCostCenterTrait { /** * @covers \Modules\Accounting\Controller\ApiController - * @group module */ + #[\PHPUnit\Framework\Attributes\Group('module')] public function testApiCostCenterCreate() : void { $response = new HttpResponse(); @@ -40,8 +40,8 @@ trait ApiControllerCostCenterTrait /** * @covers \Modules\Accounting\Controller\ApiController - * @group module */ + #[\PHPUnit\Framework\Attributes\Group('module')] public function testApiCostCenterCreateInvalid() : void { $response = new HttpResponse(); @@ -56,8 +56,8 @@ trait ApiControllerCostCenterTrait /** * @covers \Modules\Accounting\Controller\ApiController - * @group module */ + #[\PHPUnit\Framework\Attributes\Group('module')] public function testApiCostCenterUpdate() : void { $response = new HttpResponse(); @@ -74,8 +74,8 @@ trait ApiControllerCostCenterTrait /** * @covers \Modules\Accounting\Controller\ApiController - * @group module */ + #[\PHPUnit\Framework\Attributes\Group('module')] public function testApiCostCenterUpdateInvalid() : void { $response = new HttpResponse(); diff --git a/tests/Controller/Api/ApiControllerCostObjectTrait.php b/tests/Controller/Api/ApiControllerCostObjectTrait.php index 32b6b31..02fa244 100755 --- a/tests/Controller/Api/ApiControllerCostObjectTrait.php +++ b/tests/Controller/Api/ApiControllerCostObjectTrait.php @@ -22,8 +22,8 @@ trait ApiControllerCostObjectTrait { /** * @covers \Modules\Accounting\Controller\ApiController - * @group module */ + #[\PHPUnit\Framework\Attributes\Group('module')] public function testApiCostObjectCreate() : void { $response = new HttpResponse(); @@ -40,8 +40,8 @@ trait ApiControllerCostObjectTrait /** * @covers \Modules\Accounting\Controller\ApiController - * @group module */ + #[\PHPUnit\Framework\Attributes\Group('module')] public function testApiCostObjectCreateInvalid() : void { $response = new HttpResponse(); @@ -56,8 +56,8 @@ trait ApiControllerCostObjectTrait /** * @covers \Modules\Accounting\Controller\ApiController - * @group module */ + #[\PHPUnit\Framework\Attributes\Group('module')] public function testApiCostObjectUpdate() : void { $response = new HttpResponse(); @@ -74,8 +74,8 @@ trait ApiControllerCostObjectTrait /** * @covers \Modules\Accounting\Controller\ApiController - * @group module */ + #[\PHPUnit\Framework\Attributes\Group('module')] public function testApiCostObjectUpdateInvalid() : void { $response = new HttpResponse(); diff --git a/tests/Controller/Api/ApiControllerEntryTrait.php b/tests/Controller/Api/ApiControllerEntryTrait.php index 22efc97..179426c 100755 --- a/tests/Controller/Api/ApiControllerEntryTrait.php +++ b/tests/Controller/Api/ApiControllerEntryTrait.php @@ -22,8 +22,8 @@ trait ApiControllerEntryTrait { /** * @covers \Modules\Accounting\Controller\ApiController - * @group module */ + #[\PHPUnit\Framework\Attributes\Group('module')] public function testApiEntryCreate() : void { $response = new HttpResponse(); @@ -40,8 +40,8 @@ trait ApiControllerEntryTrait /** * @covers \Modules\Accounting\Controller\ApiController - * @group module */ + #[\PHPUnit\Framework\Attributes\Group('module')] public function testApiEntryCreateInvalidData() : void { $response = new HttpResponse(); @@ -56,8 +56,8 @@ trait ApiControllerEntryTrait /** * @covers \Modules\Accounting\Controller\ApiController - * @group module */ + #[\PHPUnit\Framework\Attributes\Group('module')] public function testApiEntryUpdate() : void { $response = new HttpResponse(); @@ -74,8 +74,8 @@ trait ApiControllerEntryTrait /** * @covers \Modules\Accounting\Controller\ApiController - * @group module */ + #[\PHPUnit\Framework\Attributes\Group('module')] public function testApiEntryUpdateInvalidData() : void { $response = new HttpResponse(); diff --git a/tests/Controller/Api/ApiControllerTaxKeyTrait.php b/tests/Controller/Api/ApiControllerTaxKeyTrait.php index b4c945c..d240444 100755 --- a/tests/Controller/Api/ApiControllerTaxKeyTrait.php +++ b/tests/Controller/Api/ApiControllerTaxKeyTrait.php @@ -22,8 +22,8 @@ trait ApiControllerTaxKeyTrait { /** * @covers \Modules\Accounting\Controller\ApiController - * @group module */ + #[\PHPUnit\Framework\Attributes\Group('module')] public function testApiTaxKeyCreate() : void { $response = new HttpResponse(); @@ -40,8 +40,8 @@ trait ApiControllerTaxKeyTrait /** * @covers \Modules\Accounting\Controller\ApiController - * @group module */ + #[\PHPUnit\Framework\Attributes\Group('module')] public function testApiTaxKeyCreateInvalid() : void { $response = new HttpResponse(); @@ -56,8 +56,8 @@ trait ApiControllerTaxKeyTrait /** * @covers \Modules\Accounting\Controller\ApiController - * @group module */ + #[\PHPUnit\Framework\Attributes\Group('module')] public function testApiTaxKeyUpdate() : void { $response = new HttpResponse(); @@ -74,8 +74,8 @@ trait ApiControllerTaxKeyTrait /** * @covers \Modules\Accounting\Controller\ApiController - * @group module */ + #[\PHPUnit\Framework\Attributes\Group('module')] public function testApiTaxKeyUpdateInvalid() : void { $response = new HttpResponse(); diff --git a/tests/Controller/ApiControllerTest.php b/tests/Controller/ApiControllerTest.php index 423e0ba..aed331e 100755 --- a/tests/Controller/ApiControllerTest.php +++ b/tests/Controller/ApiControllerTest.php @@ -35,10 +35,9 @@ use phpOMS\Router\WebRouter; use phpOMS\Utils\TestUtils; /** - * @testdox Modules\Accounting\tests\Controller\ApiControllerTest: Accounting api controller - * * @internal */ +#[\PHPUnit\Framework\Attributes\TestDox('Modules\Accounting\tests\Controller\ApiControllerTest: Accounting api controller')] final class ApiControllerTest extends \PHPUnit\Framework\TestCase { protected ApplicationAbstract $app; diff --git a/tests/Models/AccountAbstractTest.php b/tests/Models/AccountAbstractTest.php index 8a6fcaf..a8962ef 100755 --- a/tests/Models/AccountAbstractTest.php +++ b/tests/Models/AccountAbstractTest.php @@ -17,10 +17,9 @@ namespace Modules\Accounting\tests\Models; use Modules\Accounting\Models\AccountAbstract; /** - * @testdox Modules\Accounting\tests\Models\AccountAbstractTest: Account abstraction - * * @internal */ +#[\PHPUnit\Framework\Attributes\TestDox('Modules\Accounting\tests\Models\AccountAbstractTest: Account abstraction')] final class AccountAbstractTest extends \PHPUnit\Framework\TestCase { private $class = null; diff --git a/tests/Models/BatchPostingTest.php b/tests/Models/BatchPostingTest.php index 4477f9c..79dfd64 100755 --- a/tests/Models/BatchPostingTest.php +++ b/tests/Models/BatchPostingTest.php @@ -19,6 +19,7 @@ use Modules\Accounting\Models\BatchPosting; /** * @internal */ +#[\PHPUnit\Framework\Attributes\CoversClass(\Modules\Accounting\Models\BatchPosting::class)] final class BatchPostingTest extends \PHPUnit\Framework\TestCase { private BatchPosting $batch; @@ -31,10 +32,7 @@ final class BatchPostingTest extends \PHPUnit\Framework\TestCase $this->batch = new BatchPosting(); } - /** - * @covers \Modules\Accounting\Models\BatchPosting - * @group module - */ + #[\PHPUnit\Framework\Attributes\Group('module')] public function testDefault() : void { self::assertEquals(0, $this->batch->id); diff --git a/tests/Models/CostCenterMapperTest.php b/tests/Models/CostCenterMapperTest.php index 9d83a34..56877c5 100755 --- a/tests/Models/CostCenterMapperTest.php +++ b/tests/Models/CostCenterMapperTest.php @@ -22,12 +22,10 @@ use phpOMS\Localization\ISO639x1Enum; /** * @internal */ +#[\PHPUnit\Framework\Attributes\CoversClass(\Modules\Accounting\Models\CostCenterMapper::class)] final class CostCenterMapperTest extends \PHPUnit\Framework\TestCase { - /** - * @covers \Modules\Accounting\Models\CostCenterMapper - * @group module - */ + #[\PHPUnit\Framework\Attributes\Group('module')] public function testCR() : void { $costcenter = new CostCenter(); diff --git a/tests/Models/CostCenterTest.php b/tests/Models/CostCenterTest.php index 16fe424..d730248 100755 --- a/tests/Models/CostCenterTest.php +++ b/tests/Models/CostCenterTest.php @@ -19,6 +19,7 @@ use Modules\Accounting\Models\CostCenter; /** * @internal */ +#[\PHPUnit\Framework\Attributes\CoversClass(\Modules\Accounting\Models\CostCenter::class)] final class CostCenterTest extends \PHPUnit\Framework\TestCase { private CostCenter $cc; @@ -31,10 +32,7 @@ final class CostCenterTest extends \PHPUnit\Framework\TestCase $this->cc = new CostCenter(); } - /** - * @covers \Modules\Accounting\Models\CostCenter - * @group module - */ + #[\PHPUnit\Framework\Attributes\Group('module')] public function testDefault() : void { self::assertEquals(0, $this->cc->id); @@ -42,30 +40,21 @@ final class CostCenterTest extends \PHPUnit\Framework\TestCase self::assertNull($this->cc->parent); } - /** - * @covers \Modules\Accounting\Models\CostCenter - * @group module - */ + #[\PHPUnit\Framework\Attributes\Group('module')] public function testCodeInputOutput() : void { $this->cc->code = 'TestCode'; self::assertEquals('TestCode', $this->cc->code); } - /** - * @covers \Modules\Accounting\Models\CostCenter - * @group module - */ + #[\PHPUnit\Framework\Attributes\Group('module')] public function testParentInputOutput() : void { $this->cc->parent = 1; self::assertEquals(1, $this->cc->parent); } - /** - * @covers \Modules\Accounting\Models\CostCenter - * @group module - */ + #[\PHPUnit\Framework\Attributes\Group('module')] public function testSerialize() : void { $this->cc->code = '123'; diff --git a/tests/Models/CostObjectMapperTest.php b/tests/Models/CostObjectMapperTest.php index a008159..a177fae 100755 --- a/tests/Models/CostObjectMapperTest.php +++ b/tests/Models/CostObjectMapperTest.php @@ -22,12 +22,10 @@ use phpOMS\Localization\ISO639x1Enum; /** * @internal */ +#[\PHPUnit\Framework\Attributes\CoversClass(\Modules\Accounting\Models\CostObjectMapper::class)] final class CostObjectMapperTest extends \PHPUnit\Framework\TestCase { - /** - * @covers \Modules\Accounting\Models\CostObjectMapper - * @group module - */ + #[\PHPUnit\Framework\Attributes\Group('module')] public function testCR() : void { $costobject = new CostObject(); diff --git a/tests/Models/CostObjectTest.php b/tests/Models/CostObjectTest.php index 0cc753b..20e86cf 100755 --- a/tests/Models/CostObjectTest.php +++ b/tests/Models/CostObjectTest.php @@ -19,6 +19,7 @@ use Modules\Accounting\Models\CostObject; /** * @internal */ +#[\PHPUnit\Framework\Attributes\CoversClass(\Modules\Accounting\Models\CostObject::class)] final class CostObjectTest extends \PHPUnit\Framework\TestCase { private CostObject $co; @@ -31,10 +32,7 @@ final class CostObjectTest extends \PHPUnit\Framework\TestCase $this->co = new CostObject(); } - /** - * @covers \Modules\Accounting\Models\CostObject - * @group module - */ + #[\PHPUnit\Framework\Attributes\Group('module')] public function testDefault() : void { self::assertEquals(0, $this->co->id); @@ -42,30 +40,21 @@ final class CostObjectTest extends \PHPUnit\Framework\TestCase self::assertNull($this->co->parent); } - /** - * @covers \Modules\Accounting\Models\CostObject - * @group module - */ + #[\PHPUnit\Framework\Attributes\Group('module')] public function testCodeInputOutput() : void { $this->co->code = 'TestCode'; self::assertEquals('TestCode', $this->co->code); } - /** - * @covers \Modules\Accounting\Models\CostObject - * @group module - */ + #[\PHPUnit\Framework\Attributes\Group('module')] public function testParentInputOutput() : void { $this->co->parent = 1; self::assertEquals(1, $this->co->parent); } - /** - * @covers \Modules\Accounting\Models\CostObject - * @group module - */ + #[\PHPUnit\Framework\Attributes\Group('module')] public function testSerialize() : void { $this->co->code = '123'; diff --git a/tests/Models/CreditorTest.php b/tests/Models/CreditorTest.php index fe219d6..2662f91 100755 --- a/tests/Models/CreditorTest.php +++ b/tests/Models/CreditorTest.php @@ -19,6 +19,7 @@ use Modules\Accounting\Models\Creditor; /** * @internal */ +#[\PHPUnit\Framework\Attributes\CoversClass(\Modules\Accounting\Models\Creditor::class)] final class CreditorTest extends \PHPUnit\Framework\TestCase { private Creditor $creditor; @@ -31,19 +32,13 @@ final class CreditorTest extends \PHPUnit\Framework\TestCase $this->creditor = new Creditor(); } - /** - * @covers \Modules\Accounting\Models\Creditor - * @group module - */ + #[\PHPUnit\Framework\Attributes\Group('module')] public function testDefault() : void { self::assertEquals(0, $this->creditor->id); } - /** - * @covers \Modules\Accounting\Models\Creditor - * @group module - */ + #[\PHPUnit\Framework\Attributes\Group('module')] public function testSerialize() : void { self::assertEquals( diff --git a/tests/Models/DebitorTest.php b/tests/Models/DebitorTest.php index 2139591..4b5f37f 100755 --- a/tests/Models/DebitorTest.php +++ b/tests/Models/DebitorTest.php @@ -19,6 +19,7 @@ use Modules\Accounting\Models\Debitor; /** * @internal */ +#[\PHPUnit\Framework\Attributes\CoversClass(\Modules\Accounting\Models\Debitor::class)] final class DebitorTest extends \PHPUnit\Framework\TestCase { private Debitor $debitor; @@ -31,19 +32,13 @@ final class DebitorTest extends \PHPUnit\Framework\TestCase $this->debitor = new Debitor(); } - /** - * @covers \Modules\Accounting\Models\Debitor - * @group module - */ + #[\PHPUnit\Framework\Attributes\Group('module')] public function testDefault() : void { self::assertEquals(0, $this->debitor->id); } - /** - * @covers \Modules\Accounting\Models\Debitor - * @group module - */ + #[\PHPUnit\Framework\Attributes\Group('module')] public function testSerialize() : void { self::assertEquals( diff --git a/tests/Models/NullCostCenterTest.php b/tests/Models/NullCostCenterTest.php index f569679..30c9026 100755 --- a/tests/Models/NullCostCenterTest.php +++ b/tests/Models/NullCostCenterTest.php @@ -19,31 +19,23 @@ use Modules\Accounting\Models\NullCostCenter; /** * @internal */ +#[\PHPUnit\Framework\Attributes\CoversClass(\Modules\Accounting\Models\NullCostCenter::class)] final class NullCostCenterTest extends \PHPUnit\Framework\TestCase { - /** - * @covers \Modules\Accounting\Models\NullCostCenter - * @group module - */ + #[\PHPUnit\Framework\Attributes\Group('module')] public function testNull() : void { self::assertInstanceOf('\Modules\Accounting\Models\CostCenter', new NullCostCenter()); } - /** - * @covers \Modules\Accounting\Models\NullCostCenter - * @group module - */ + #[\PHPUnit\Framework\Attributes\Group('module')] public function testId() : void { $null = new NullCostCenter(2); self::assertEquals(2, $null->id); } - /** - * @covers \Modules\Accounting\Models\NullCostCenter - * @group module - */ + #[\PHPUnit\Framework\Attributes\Group('module')] public function testJsonSerialize() : void { $null = new NullCostCenter(2); diff --git a/tests/Models/NullCostObjectTest.php b/tests/Models/NullCostObjectTest.php index a925058..6b0415d 100755 --- a/tests/Models/NullCostObjectTest.php +++ b/tests/Models/NullCostObjectTest.php @@ -19,31 +19,23 @@ use Modules\Accounting\Models\NullCostObject; /** * @internal */ +#[\PHPUnit\Framework\Attributes\CoversClass(\Modules\Accounting\Models\NullCostObject::class)] final class NullCostObjectTest extends \PHPUnit\Framework\TestCase { - /** - * @covers \Modules\Accounting\Models\NullCostObject - * @group module - */ + #[\PHPUnit\Framework\Attributes\Group('module')] public function testNull() : void { self::assertInstanceOf('\Modules\Accounting\Models\CostObject', new NullCostObject()); } - /** - * @covers \Modules\Accounting\Models\NullCostObject - * @group module - */ + #[\PHPUnit\Framework\Attributes\Group('module')] public function testId() : void { $null = new NullCostObject(2); self::assertEquals(2, $null->id); } - /** - * @covers \Modules\Accounting\Models\NullCostObject - * @group module - */ + #[\PHPUnit\Framework\Attributes\Group('module')] public function testJsonSerialize() : void { $null = new NullCostObject(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* + +