mirror of
https://github.com/Karaka-Management/oms-Accounting.git
synced 2026-02-16 04:18:40 +00:00
upgrade phpunit
This commit is contained in:
parent
eb9f251b2e
commit
23b69493d7
|
|
@ -17,7 +17,7 @@ namespace Modules\Accounting\tests\Admin;
|
||||||
/**
|
/**
|
||||||
* @internal
|
* @internal
|
||||||
*/
|
*/
|
||||||
final class AccountingTest extends \PHPUnit\Framework\TestCase
|
final class AdminTest extends \PHPUnit\Framework\TestCase
|
||||||
{
|
{
|
||||||
protected const NAME = 'Accounting';
|
protected const NAME = 'Accounting';
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -22,8 +22,8 @@ trait ApiControllerAccountTrait
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* @covers \Modules\Accounting\Controller\ApiController
|
* @covers \Modules\Accounting\Controller\ApiController
|
||||||
* @group module
|
|
||||||
*/
|
*/
|
||||||
|
#[\PHPUnit\Framework\Attributes\Group('module')]
|
||||||
public function testApiAccountCreate() : void
|
public function testApiAccountCreate() : void
|
||||||
{
|
{
|
||||||
$response = new HttpResponse();
|
$response = new HttpResponse();
|
||||||
|
|
@ -40,8 +40,8 @@ trait ApiControllerAccountTrait
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers \Modules\Accounting\Controller\ApiController
|
* @covers \Modules\Accounting\Controller\ApiController
|
||||||
* @group module
|
|
||||||
*/
|
*/
|
||||||
|
#[\PHPUnit\Framework\Attributes\Group('module')]
|
||||||
public function testApiAccountCreateInvalid() : void
|
public function testApiAccountCreateInvalid() : void
|
||||||
{
|
{
|
||||||
$response = new HttpResponse();
|
$response = new HttpResponse();
|
||||||
|
|
@ -56,8 +56,8 @@ trait ApiControllerAccountTrait
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers \Modules\Accounting\Controller\ApiController
|
* @covers \Modules\Accounting\Controller\ApiController
|
||||||
* @group module
|
|
||||||
*/
|
*/
|
||||||
|
#[\PHPUnit\Framework\Attributes\Group('module')]
|
||||||
public function testApiAccountUpdate() : void
|
public function testApiAccountUpdate() : void
|
||||||
{
|
{
|
||||||
$response = new HttpResponse();
|
$response = new HttpResponse();
|
||||||
|
|
@ -74,8 +74,8 @@ trait ApiControllerAccountTrait
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers \Modules\Accounting\Controller\ApiController
|
* @covers \Modules\Accounting\Controller\ApiController
|
||||||
* @group module
|
|
||||||
*/
|
*/
|
||||||
|
#[\PHPUnit\Framework\Attributes\Group('module')]
|
||||||
public function testApiAccountUpdateInvalid() : void
|
public function testApiAccountUpdateInvalid() : void
|
||||||
{
|
{
|
||||||
$response = new HttpResponse();
|
$response = new HttpResponse();
|
||||||
|
|
|
||||||
|
|
@ -22,8 +22,8 @@ trait ApiControllerBatchEntryTrait
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* @covers \Modules\Accounting\Controller\ApiController
|
* @covers \Modules\Accounting\Controller\ApiController
|
||||||
* @group module
|
|
||||||
*/
|
*/
|
||||||
|
#[\PHPUnit\Framework\Attributes\Group('module')]
|
||||||
public function testApiBatchEntryCreate() : void
|
public function testApiBatchEntryCreate() : void
|
||||||
{
|
{
|
||||||
$response = new HttpResponse();
|
$response = new HttpResponse();
|
||||||
|
|
@ -40,8 +40,8 @@ trait ApiControllerBatchEntryTrait
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers \Modules\Accounting\Controller\ApiController
|
* @covers \Modules\Accounting\Controller\ApiController
|
||||||
* @group module
|
|
||||||
*/
|
*/
|
||||||
|
#[\PHPUnit\Framework\Attributes\Group('module')]
|
||||||
public function testApiBatchEntryCreateInvalid() : void
|
public function testApiBatchEntryCreateInvalid() : void
|
||||||
{
|
{
|
||||||
$response = new HttpResponse();
|
$response = new HttpResponse();
|
||||||
|
|
@ -56,8 +56,8 @@ trait ApiControllerBatchEntryTrait
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers \Modules\Accounting\Controller\ApiController
|
* @covers \Modules\Accounting\Controller\ApiController
|
||||||
* @group module
|
|
||||||
*/
|
*/
|
||||||
|
#[\PHPUnit\Framework\Attributes\Group('module')]
|
||||||
public function testApiBatchEntryUpdate() : void
|
public function testApiBatchEntryUpdate() : void
|
||||||
{
|
{
|
||||||
$response = new HttpResponse();
|
$response = new HttpResponse();
|
||||||
|
|
@ -74,8 +74,8 @@ trait ApiControllerBatchEntryTrait
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers \Modules\Accounting\Controller\ApiController
|
* @covers \Modules\Accounting\Controller\ApiController
|
||||||
* @group module
|
|
||||||
*/
|
*/
|
||||||
|
#[\PHPUnit\Framework\Attributes\Group('module')]
|
||||||
public function testApiBatchEntryUpdateInvalid() : void
|
public function testApiBatchEntryUpdateInvalid() : void
|
||||||
{
|
{
|
||||||
$response = new HttpResponse();
|
$response = new HttpResponse();
|
||||||
|
|
@ -90,8 +90,8 @@ trait ApiControllerBatchEntryTrait
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers \Modules\Accounting\Controller\ApiController
|
* @covers \Modules\Accounting\Controller\ApiController
|
||||||
* @group module
|
|
||||||
*/
|
*/
|
||||||
|
#[\PHPUnit\Framework\Attributes\Group('module')]
|
||||||
public function testApiRecurringEntryCreate() : void
|
public function testApiRecurringEntryCreate() : void
|
||||||
{
|
{
|
||||||
$response = new HttpResponse();
|
$response = new HttpResponse();
|
||||||
|
|
@ -108,8 +108,8 @@ trait ApiControllerBatchEntryTrait
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers \Modules\Accounting\Controller\ApiController
|
* @covers \Modules\Accounting\Controller\ApiController
|
||||||
* @group module
|
|
||||||
*/
|
*/
|
||||||
|
#[\PHPUnit\Framework\Attributes\Group('module')]
|
||||||
public function testApiRecurringEntryCreateInvalid() : void
|
public function testApiRecurringEntryCreateInvalid() : void
|
||||||
{
|
{
|
||||||
$response = new HttpResponse();
|
$response = new HttpResponse();
|
||||||
|
|
@ -124,8 +124,8 @@ trait ApiControllerBatchEntryTrait
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers \Modules\Accounting\Controller\ApiController
|
* @covers \Modules\Accounting\Controller\ApiController
|
||||||
* @group module
|
|
||||||
*/
|
*/
|
||||||
|
#[\PHPUnit\Framework\Attributes\Group('module')]
|
||||||
public function testApiRecurringEntryUpdate() : void
|
public function testApiRecurringEntryUpdate() : void
|
||||||
{
|
{
|
||||||
$response = new HttpResponse();
|
$response = new HttpResponse();
|
||||||
|
|
@ -142,8 +142,8 @@ trait ApiControllerBatchEntryTrait
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers \Modules\Accounting\Controller\ApiController
|
* @covers \Modules\Accounting\Controller\ApiController
|
||||||
* @group module
|
|
||||||
*/
|
*/
|
||||||
|
#[\PHPUnit\Framework\Attributes\Group('module')]
|
||||||
public function testApiRecurringEntryUpdateInvalid() : void
|
public function testApiRecurringEntryUpdateInvalid() : void
|
||||||
{
|
{
|
||||||
$response = new HttpResponse();
|
$response = new HttpResponse();
|
||||||
|
|
|
||||||
|
|
@ -22,8 +22,8 @@ trait ApiControllerCostCenterTrait
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* @covers \Modules\Accounting\Controller\ApiController
|
* @covers \Modules\Accounting\Controller\ApiController
|
||||||
* @group module
|
|
||||||
*/
|
*/
|
||||||
|
#[\PHPUnit\Framework\Attributes\Group('module')]
|
||||||
public function testApiCostCenterCreate() : void
|
public function testApiCostCenterCreate() : void
|
||||||
{
|
{
|
||||||
$response = new HttpResponse();
|
$response = new HttpResponse();
|
||||||
|
|
@ -40,8 +40,8 @@ trait ApiControllerCostCenterTrait
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers \Modules\Accounting\Controller\ApiController
|
* @covers \Modules\Accounting\Controller\ApiController
|
||||||
* @group module
|
|
||||||
*/
|
*/
|
||||||
|
#[\PHPUnit\Framework\Attributes\Group('module')]
|
||||||
public function testApiCostCenterCreateInvalid() : void
|
public function testApiCostCenterCreateInvalid() : void
|
||||||
{
|
{
|
||||||
$response = new HttpResponse();
|
$response = new HttpResponse();
|
||||||
|
|
@ -56,8 +56,8 @@ trait ApiControllerCostCenterTrait
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers \Modules\Accounting\Controller\ApiController
|
* @covers \Modules\Accounting\Controller\ApiController
|
||||||
* @group module
|
|
||||||
*/
|
*/
|
||||||
|
#[\PHPUnit\Framework\Attributes\Group('module')]
|
||||||
public function testApiCostCenterUpdate() : void
|
public function testApiCostCenterUpdate() : void
|
||||||
{
|
{
|
||||||
$response = new HttpResponse();
|
$response = new HttpResponse();
|
||||||
|
|
@ -74,8 +74,8 @@ trait ApiControllerCostCenterTrait
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers \Modules\Accounting\Controller\ApiController
|
* @covers \Modules\Accounting\Controller\ApiController
|
||||||
* @group module
|
|
||||||
*/
|
*/
|
||||||
|
#[\PHPUnit\Framework\Attributes\Group('module')]
|
||||||
public function testApiCostCenterUpdateInvalid() : void
|
public function testApiCostCenterUpdateInvalid() : void
|
||||||
{
|
{
|
||||||
$response = new HttpResponse();
|
$response = new HttpResponse();
|
||||||
|
|
|
||||||
|
|
@ -22,8 +22,8 @@ trait ApiControllerCostObjectTrait
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* @covers \Modules\Accounting\Controller\ApiController
|
* @covers \Modules\Accounting\Controller\ApiController
|
||||||
* @group module
|
|
||||||
*/
|
*/
|
||||||
|
#[\PHPUnit\Framework\Attributes\Group('module')]
|
||||||
public function testApiCostObjectCreate() : void
|
public function testApiCostObjectCreate() : void
|
||||||
{
|
{
|
||||||
$response = new HttpResponse();
|
$response = new HttpResponse();
|
||||||
|
|
@ -40,8 +40,8 @@ trait ApiControllerCostObjectTrait
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers \Modules\Accounting\Controller\ApiController
|
* @covers \Modules\Accounting\Controller\ApiController
|
||||||
* @group module
|
|
||||||
*/
|
*/
|
||||||
|
#[\PHPUnit\Framework\Attributes\Group('module')]
|
||||||
public function testApiCostObjectCreateInvalid() : void
|
public function testApiCostObjectCreateInvalid() : void
|
||||||
{
|
{
|
||||||
$response = new HttpResponse();
|
$response = new HttpResponse();
|
||||||
|
|
@ -56,8 +56,8 @@ trait ApiControllerCostObjectTrait
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers \Modules\Accounting\Controller\ApiController
|
* @covers \Modules\Accounting\Controller\ApiController
|
||||||
* @group module
|
|
||||||
*/
|
*/
|
||||||
|
#[\PHPUnit\Framework\Attributes\Group('module')]
|
||||||
public function testApiCostObjectUpdate() : void
|
public function testApiCostObjectUpdate() : void
|
||||||
{
|
{
|
||||||
$response = new HttpResponse();
|
$response = new HttpResponse();
|
||||||
|
|
@ -74,8 +74,8 @@ trait ApiControllerCostObjectTrait
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers \Modules\Accounting\Controller\ApiController
|
* @covers \Modules\Accounting\Controller\ApiController
|
||||||
* @group module
|
|
||||||
*/
|
*/
|
||||||
|
#[\PHPUnit\Framework\Attributes\Group('module')]
|
||||||
public function testApiCostObjectUpdateInvalid() : void
|
public function testApiCostObjectUpdateInvalid() : void
|
||||||
{
|
{
|
||||||
$response = new HttpResponse();
|
$response = new HttpResponse();
|
||||||
|
|
|
||||||
|
|
@ -22,8 +22,8 @@ trait ApiControllerEntryTrait
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* @covers \Modules\Accounting\Controller\ApiController
|
* @covers \Modules\Accounting\Controller\ApiController
|
||||||
* @group module
|
|
||||||
*/
|
*/
|
||||||
|
#[\PHPUnit\Framework\Attributes\Group('module')]
|
||||||
public function testApiEntryCreate() : void
|
public function testApiEntryCreate() : void
|
||||||
{
|
{
|
||||||
$response = new HttpResponse();
|
$response = new HttpResponse();
|
||||||
|
|
@ -40,8 +40,8 @@ trait ApiControllerEntryTrait
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers \Modules\Accounting\Controller\ApiController
|
* @covers \Modules\Accounting\Controller\ApiController
|
||||||
* @group module
|
|
||||||
*/
|
*/
|
||||||
|
#[\PHPUnit\Framework\Attributes\Group('module')]
|
||||||
public function testApiEntryCreateInvalidData() : void
|
public function testApiEntryCreateInvalidData() : void
|
||||||
{
|
{
|
||||||
$response = new HttpResponse();
|
$response = new HttpResponse();
|
||||||
|
|
@ -56,8 +56,8 @@ trait ApiControllerEntryTrait
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers \Modules\Accounting\Controller\ApiController
|
* @covers \Modules\Accounting\Controller\ApiController
|
||||||
* @group module
|
|
||||||
*/
|
*/
|
||||||
|
#[\PHPUnit\Framework\Attributes\Group('module')]
|
||||||
public function testApiEntryUpdate() : void
|
public function testApiEntryUpdate() : void
|
||||||
{
|
{
|
||||||
$response = new HttpResponse();
|
$response = new HttpResponse();
|
||||||
|
|
@ -74,8 +74,8 @@ trait ApiControllerEntryTrait
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers \Modules\Accounting\Controller\ApiController
|
* @covers \Modules\Accounting\Controller\ApiController
|
||||||
* @group module
|
|
||||||
*/
|
*/
|
||||||
|
#[\PHPUnit\Framework\Attributes\Group('module')]
|
||||||
public function testApiEntryUpdateInvalidData() : void
|
public function testApiEntryUpdateInvalidData() : void
|
||||||
{
|
{
|
||||||
$response = new HttpResponse();
|
$response = new HttpResponse();
|
||||||
|
|
|
||||||
|
|
@ -22,8 +22,8 @@ trait ApiControllerTaxKeyTrait
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* @covers \Modules\Accounting\Controller\ApiController
|
* @covers \Modules\Accounting\Controller\ApiController
|
||||||
* @group module
|
|
||||||
*/
|
*/
|
||||||
|
#[\PHPUnit\Framework\Attributes\Group('module')]
|
||||||
public function testApiTaxKeyCreate() : void
|
public function testApiTaxKeyCreate() : void
|
||||||
{
|
{
|
||||||
$response = new HttpResponse();
|
$response = new HttpResponse();
|
||||||
|
|
@ -40,8 +40,8 @@ trait ApiControllerTaxKeyTrait
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers \Modules\Accounting\Controller\ApiController
|
* @covers \Modules\Accounting\Controller\ApiController
|
||||||
* @group module
|
|
||||||
*/
|
*/
|
||||||
|
#[\PHPUnit\Framework\Attributes\Group('module')]
|
||||||
public function testApiTaxKeyCreateInvalid() : void
|
public function testApiTaxKeyCreateInvalid() : void
|
||||||
{
|
{
|
||||||
$response = new HttpResponse();
|
$response = new HttpResponse();
|
||||||
|
|
@ -56,8 +56,8 @@ trait ApiControllerTaxKeyTrait
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers \Modules\Accounting\Controller\ApiController
|
* @covers \Modules\Accounting\Controller\ApiController
|
||||||
* @group module
|
|
||||||
*/
|
*/
|
||||||
|
#[\PHPUnit\Framework\Attributes\Group('module')]
|
||||||
public function testApiTaxKeyUpdate() : void
|
public function testApiTaxKeyUpdate() : void
|
||||||
{
|
{
|
||||||
$response = new HttpResponse();
|
$response = new HttpResponse();
|
||||||
|
|
@ -74,8 +74,8 @@ trait ApiControllerTaxKeyTrait
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers \Modules\Accounting\Controller\ApiController
|
* @covers \Modules\Accounting\Controller\ApiController
|
||||||
* @group module
|
|
||||||
*/
|
*/
|
||||||
|
#[\PHPUnit\Framework\Attributes\Group('module')]
|
||||||
public function testApiTaxKeyUpdateInvalid() : void
|
public function testApiTaxKeyUpdateInvalid() : void
|
||||||
{
|
{
|
||||||
$response = new HttpResponse();
|
$response = new HttpResponse();
|
||||||
|
|
|
||||||
|
|
@ -35,10 +35,9 @@ use phpOMS\Router\WebRouter;
|
||||||
use phpOMS\Utils\TestUtils;
|
use phpOMS\Utils\TestUtils;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @testdox Modules\Accounting\tests\Controller\ApiControllerTest: Accounting api controller
|
|
||||||
*
|
|
||||||
* @internal
|
* @internal
|
||||||
*/
|
*/
|
||||||
|
#[\PHPUnit\Framework\Attributes\TestDox('Modules\Accounting\tests\Controller\ApiControllerTest: Accounting api controller')]
|
||||||
final class ApiControllerTest extends \PHPUnit\Framework\TestCase
|
final class ApiControllerTest extends \PHPUnit\Framework\TestCase
|
||||||
{
|
{
|
||||||
protected ApplicationAbstract $app;
|
protected ApplicationAbstract $app;
|
||||||
|
|
|
||||||
|
|
@ -17,10 +17,9 @@ namespace Modules\Accounting\tests\Models;
|
||||||
use Modules\Accounting\Models\AccountAbstract;
|
use Modules\Accounting\Models\AccountAbstract;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @testdox Modules\Accounting\tests\Models\AccountAbstractTest: Account abstraction
|
|
||||||
*
|
|
||||||
* @internal
|
* @internal
|
||||||
*/
|
*/
|
||||||
|
#[\PHPUnit\Framework\Attributes\TestDox('Modules\Accounting\tests\Models\AccountAbstractTest: Account abstraction')]
|
||||||
final class AccountAbstractTest extends \PHPUnit\Framework\TestCase
|
final class AccountAbstractTest extends \PHPUnit\Framework\TestCase
|
||||||
{
|
{
|
||||||
private $class = null;
|
private $class = null;
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,7 @@ use Modules\Accounting\Models\BatchPosting;
|
||||||
/**
|
/**
|
||||||
* @internal
|
* @internal
|
||||||
*/
|
*/
|
||||||
|
#[\PHPUnit\Framework\Attributes\CoversClass(\Modules\Accounting\Models\BatchPosting::class)]
|
||||||
final class BatchPostingTest extends \PHPUnit\Framework\TestCase
|
final class BatchPostingTest extends \PHPUnit\Framework\TestCase
|
||||||
{
|
{
|
||||||
private BatchPosting $batch;
|
private BatchPosting $batch;
|
||||||
|
|
@ -31,10 +32,7 @@ final class BatchPostingTest extends \PHPUnit\Framework\TestCase
|
||||||
$this->batch = new BatchPosting();
|
$this->batch = new BatchPosting();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#[\PHPUnit\Framework\Attributes\Group('module')]
|
||||||
* @covers \Modules\Accounting\Models\BatchPosting
|
|
||||||
* @group module
|
|
||||||
*/
|
|
||||||
public function testDefault() : void
|
public function testDefault() : void
|
||||||
{
|
{
|
||||||
self::assertEquals(0, $this->batch->id);
|
self::assertEquals(0, $this->batch->id);
|
||||||
|
|
|
||||||
|
|
@ -22,12 +22,10 @@ use phpOMS\Localization\ISO639x1Enum;
|
||||||
/**
|
/**
|
||||||
* @internal
|
* @internal
|
||||||
*/
|
*/
|
||||||
|
#[\PHPUnit\Framework\Attributes\CoversClass(\Modules\Accounting\Models\CostCenterMapper::class)]
|
||||||
final class CostCenterMapperTest extends \PHPUnit\Framework\TestCase
|
final class CostCenterMapperTest extends \PHPUnit\Framework\TestCase
|
||||||
{
|
{
|
||||||
/**
|
#[\PHPUnit\Framework\Attributes\Group('module')]
|
||||||
* @covers \Modules\Accounting\Models\CostCenterMapper
|
|
||||||
* @group module
|
|
||||||
*/
|
|
||||||
public function testCR() : void
|
public function testCR() : void
|
||||||
{
|
{
|
||||||
$costcenter = new CostCenter();
|
$costcenter = new CostCenter();
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,7 @@ use Modules\Accounting\Models\CostCenter;
|
||||||
/**
|
/**
|
||||||
* @internal
|
* @internal
|
||||||
*/
|
*/
|
||||||
|
#[\PHPUnit\Framework\Attributes\CoversClass(\Modules\Accounting\Models\CostCenter::class)]
|
||||||
final class CostCenterTest extends \PHPUnit\Framework\TestCase
|
final class CostCenterTest extends \PHPUnit\Framework\TestCase
|
||||||
{
|
{
|
||||||
private CostCenter $cc;
|
private CostCenter $cc;
|
||||||
|
|
@ -31,10 +32,7 @@ final class CostCenterTest extends \PHPUnit\Framework\TestCase
|
||||||
$this->cc = new CostCenter();
|
$this->cc = new CostCenter();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#[\PHPUnit\Framework\Attributes\Group('module')]
|
||||||
* @covers \Modules\Accounting\Models\CostCenter
|
|
||||||
* @group module
|
|
||||||
*/
|
|
||||||
public function testDefault() : void
|
public function testDefault() : void
|
||||||
{
|
{
|
||||||
self::assertEquals(0, $this->cc->id);
|
self::assertEquals(0, $this->cc->id);
|
||||||
|
|
@ -42,30 +40,21 @@ final class CostCenterTest extends \PHPUnit\Framework\TestCase
|
||||||
self::assertNull($this->cc->parent);
|
self::assertNull($this->cc->parent);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#[\PHPUnit\Framework\Attributes\Group('module')]
|
||||||
* @covers \Modules\Accounting\Models\CostCenter
|
|
||||||
* @group module
|
|
||||||
*/
|
|
||||||
public function testCodeInputOutput() : void
|
public function testCodeInputOutput() : void
|
||||||
{
|
{
|
||||||
$this->cc->code = 'TestCode';
|
$this->cc->code = 'TestCode';
|
||||||
self::assertEquals('TestCode', $this->cc->code);
|
self::assertEquals('TestCode', $this->cc->code);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#[\PHPUnit\Framework\Attributes\Group('module')]
|
||||||
* @covers \Modules\Accounting\Models\CostCenter
|
|
||||||
* @group module
|
|
||||||
*/
|
|
||||||
public function testParentInputOutput() : void
|
public function testParentInputOutput() : void
|
||||||
{
|
{
|
||||||
$this->cc->parent = 1;
|
$this->cc->parent = 1;
|
||||||
self::assertEquals(1, $this->cc->parent);
|
self::assertEquals(1, $this->cc->parent);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#[\PHPUnit\Framework\Attributes\Group('module')]
|
||||||
* @covers \Modules\Accounting\Models\CostCenter
|
|
||||||
* @group module
|
|
||||||
*/
|
|
||||||
public function testSerialize() : void
|
public function testSerialize() : void
|
||||||
{
|
{
|
||||||
$this->cc->code = '123';
|
$this->cc->code = '123';
|
||||||
|
|
|
||||||
|
|
@ -22,12 +22,10 @@ use phpOMS\Localization\ISO639x1Enum;
|
||||||
/**
|
/**
|
||||||
* @internal
|
* @internal
|
||||||
*/
|
*/
|
||||||
|
#[\PHPUnit\Framework\Attributes\CoversClass(\Modules\Accounting\Models\CostObjectMapper::class)]
|
||||||
final class CostObjectMapperTest extends \PHPUnit\Framework\TestCase
|
final class CostObjectMapperTest extends \PHPUnit\Framework\TestCase
|
||||||
{
|
{
|
||||||
/**
|
#[\PHPUnit\Framework\Attributes\Group('module')]
|
||||||
* @covers \Modules\Accounting\Models\CostObjectMapper
|
|
||||||
* @group module
|
|
||||||
*/
|
|
||||||
public function testCR() : void
|
public function testCR() : void
|
||||||
{
|
{
|
||||||
$costobject = new CostObject();
|
$costobject = new CostObject();
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,7 @@ use Modules\Accounting\Models\CostObject;
|
||||||
/**
|
/**
|
||||||
* @internal
|
* @internal
|
||||||
*/
|
*/
|
||||||
|
#[\PHPUnit\Framework\Attributes\CoversClass(\Modules\Accounting\Models\CostObject::class)]
|
||||||
final class CostObjectTest extends \PHPUnit\Framework\TestCase
|
final class CostObjectTest extends \PHPUnit\Framework\TestCase
|
||||||
{
|
{
|
||||||
private CostObject $co;
|
private CostObject $co;
|
||||||
|
|
@ -31,10 +32,7 @@ final class CostObjectTest extends \PHPUnit\Framework\TestCase
|
||||||
$this->co = new CostObject();
|
$this->co = new CostObject();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#[\PHPUnit\Framework\Attributes\Group('module')]
|
||||||
* @covers \Modules\Accounting\Models\CostObject
|
|
||||||
* @group module
|
|
||||||
*/
|
|
||||||
public function testDefault() : void
|
public function testDefault() : void
|
||||||
{
|
{
|
||||||
self::assertEquals(0, $this->co->id);
|
self::assertEquals(0, $this->co->id);
|
||||||
|
|
@ -42,30 +40,21 @@ final class CostObjectTest extends \PHPUnit\Framework\TestCase
|
||||||
self::assertNull($this->co->parent);
|
self::assertNull($this->co->parent);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#[\PHPUnit\Framework\Attributes\Group('module')]
|
||||||
* @covers \Modules\Accounting\Models\CostObject
|
|
||||||
* @group module
|
|
||||||
*/
|
|
||||||
public function testCodeInputOutput() : void
|
public function testCodeInputOutput() : void
|
||||||
{
|
{
|
||||||
$this->co->code = 'TestCode';
|
$this->co->code = 'TestCode';
|
||||||
self::assertEquals('TestCode', $this->co->code);
|
self::assertEquals('TestCode', $this->co->code);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#[\PHPUnit\Framework\Attributes\Group('module')]
|
||||||
* @covers \Modules\Accounting\Models\CostObject
|
|
||||||
* @group module
|
|
||||||
*/
|
|
||||||
public function testParentInputOutput() : void
|
public function testParentInputOutput() : void
|
||||||
{
|
{
|
||||||
$this->co->parent = 1;
|
$this->co->parent = 1;
|
||||||
self::assertEquals(1, $this->co->parent);
|
self::assertEquals(1, $this->co->parent);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#[\PHPUnit\Framework\Attributes\Group('module')]
|
||||||
* @covers \Modules\Accounting\Models\CostObject
|
|
||||||
* @group module
|
|
||||||
*/
|
|
||||||
public function testSerialize() : void
|
public function testSerialize() : void
|
||||||
{
|
{
|
||||||
$this->co->code = '123';
|
$this->co->code = '123';
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,7 @@ use Modules\Accounting\Models\Creditor;
|
||||||
/**
|
/**
|
||||||
* @internal
|
* @internal
|
||||||
*/
|
*/
|
||||||
|
#[\PHPUnit\Framework\Attributes\CoversClass(\Modules\Accounting\Models\Creditor::class)]
|
||||||
final class CreditorTest extends \PHPUnit\Framework\TestCase
|
final class CreditorTest extends \PHPUnit\Framework\TestCase
|
||||||
{
|
{
|
||||||
private Creditor $creditor;
|
private Creditor $creditor;
|
||||||
|
|
@ -31,19 +32,13 @@ final class CreditorTest extends \PHPUnit\Framework\TestCase
|
||||||
$this->creditor = new Creditor();
|
$this->creditor = new Creditor();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#[\PHPUnit\Framework\Attributes\Group('module')]
|
||||||
* @covers \Modules\Accounting\Models\Creditor
|
|
||||||
* @group module
|
|
||||||
*/
|
|
||||||
public function testDefault() : void
|
public function testDefault() : void
|
||||||
{
|
{
|
||||||
self::assertEquals(0, $this->creditor->id);
|
self::assertEquals(0, $this->creditor->id);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#[\PHPUnit\Framework\Attributes\Group('module')]
|
||||||
* @covers \Modules\Accounting\Models\Creditor
|
|
||||||
* @group module
|
|
||||||
*/
|
|
||||||
public function testSerialize() : void
|
public function testSerialize() : void
|
||||||
{
|
{
|
||||||
self::assertEquals(
|
self::assertEquals(
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,7 @@ use Modules\Accounting\Models\Debitor;
|
||||||
/**
|
/**
|
||||||
* @internal
|
* @internal
|
||||||
*/
|
*/
|
||||||
|
#[\PHPUnit\Framework\Attributes\CoversClass(\Modules\Accounting\Models\Debitor::class)]
|
||||||
final class DebitorTest extends \PHPUnit\Framework\TestCase
|
final class DebitorTest extends \PHPUnit\Framework\TestCase
|
||||||
{
|
{
|
||||||
private Debitor $debitor;
|
private Debitor $debitor;
|
||||||
|
|
@ -31,19 +32,13 @@ final class DebitorTest extends \PHPUnit\Framework\TestCase
|
||||||
$this->debitor = new Debitor();
|
$this->debitor = new Debitor();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#[\PHPUnit\Framework\Attributes\Group('module')]
|
||||||
* @covers \Modules\Accounting\Models\Debitor
|
|
||||||
* @group module
|
|
||||||
*/
|
|
||||||
public function testDefault() : void
|
public function testDefault() : void
|
||||||
{
|
{
|
||||||
self::assertEquals(0, $this->debitor->id);
|
self::assertEquals(0, $this->debitor->id);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#[\PHPUnit\Framework\Attributes\Group('module')]
|
||||||
* @covers \Modules\Accounting\Models\Debitor
|
|
||||||
* @group module
|
|
||||||
*/
|
|
||||||
public function testSerialize() : void
|
public function testSerialize() : void
|
||||||
{
|
{
|
||||||
self::assertEquals(
|
self::assertEquals(
|
||||||
|
|
|
||||||
|
|
@ -19,31 +19,23 @@ use Modules\Accounting\Models\NullCostCenter;
|
||||||
/**
|
/**
|
||||||
* @internal
|
* @internal
|
||||||
*/
|
*/
|
||||||
|
#[\PHPUnit\Framework\Attributes\CoversClass(\Modules\Accounting\Models\NullCostCenter::class)]
|
||||||
final class NullCostCenterTest extends \PHPUnit\Framework\TestCase
|
final class NullCostCenterTest extends \PHPUnit\Framework\TestCase
|
||||||
{
|
{
|
||||||
/**
|
#[\PHPUnit\Framework\Attributes\Group('module')]
|
||||||
* @covers \Modules\Accounting\Models\NullCostCenter
|
|
||||||
* @group module
|
|
||||||
*/
|
|
||||||
public function testNull() : void
|
public function testNull() : void
|
||||||
{
|
{
|
||||||
self::assertInstanceOf('\Modules\Accounting\Models\CostCenter', new NullCostCenter());
|
self::assertInstanceOf('\Modules\Accounting\Models\CostCenter', new NullCostCenter());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#[\PHPUnit\Framework\Attributes\Group('module')]
|
||||||
* @covers \Modules\Accounting\Models\NullCostCenter
|
|
||||||
* @group module
|
|
||||||
*/
|
|
||||||
public function testId() : void
|
public function testId() : void
|
||||||
{
|
{
|
||||||
$null = new NullCostCenter(2);
|
$null = new NullCostCenter(2);
|
||||||
self::assertEquals(2, $null->id);
|
self::assertEquals(2, $null->id);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#[\PHPUnit\Framework\Attributes\Group('module')]
|
||||||
* @covers \Modules\Accounting\Models\NullCostCenter
|
|
||||||
* @group module
|
|
||||||
*/
|
|
||||||
public function testJsonSerialize() : void
|
public function testJsonSerialize() : void
|
||||||
{
|
{
|
||||||
$null = new NullCostCenter(2);
|
$null = new NullCostCenter(2);
|
||||||
|
|
|
||||||
|
|
@ -19,31 +19,23 @@ use Modules\Accounting\Models\NullCostObject;
|
||||||
/**
|
/**
|
||||||
* @internal
|
* @internal
|
||||||
*/
|
*/
|
||||||
|
#[\PHPUnit\Framework\Attributes\CoversClass(\Modules\Accounting\Models\NullCostObject::class)]
|
||||||
final class NullCostObjectTest extends \PHPUnit\Framework\TestCase
|
final class NullCostObjectTest extends \PHPUnit\Framework\TestCase
|
||||||
{
|
{
|
||||||
/**
|
#[\PHPUnit\Framework\Attributes\Group('module')]
|
||||||
* @covers \Modules\Accounting\Models\NullCostObject
|
|
||||||
* @group module
|
|
||||||
*/
|
|
||||||
public function testNull() : void
|
public function testNull() : void
|
||||||
{
|
{
|
||||||
self::assertInstanceOf('\Modules\Accounting\Models\CostObject', new NullCostObject());
|
self::assertInstanceOf('\Modules\Accounting\Models\CostObject', new NullCostObject());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#[\PHPUnit\Framework\Attributes\Group('module')]
|
||||||
* @covers \Modules\Accounting\Models\NullCostObject
|
|
||||||
* @group module
|
|
||||||
*/
|
|
||||||
public function testId() : void
|
public function testId() : void
|
||||||
{
|
{
|
||||||
$null = new NullCostObject(2);
|
$null = new NullCostObject(2);
|
||||||
self::assertEquals(2, $null->id);
|
self::assertEquals(2, $null->id);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#[\PHPUnit\Framework\Attributes\Group('module')]
|
||||||
* @covers \Modules\Accounting\Models\NullCostObject
|
|
||||||
* @group module
|
|
||||||
*/
|
|
||||||
public function testJsonSerialize() : void
|
public function testJsonSerialize() : void
|
||||||
{
|
{
|
||||||
$null = new NullCostObject(2);
|
$null = new NullCostObject(2);
|
||||||
|
|
|
||||||
|
|
@ -1,31 +1,6 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" bootstrap="Bootstrap.php" colors="true" columns="120" stopOnError="true" stopOnFailure="false" stopOnIncomplete="false" stopOnSkipped="false" beStrictAboutTestsThatDoNotTestAnything="false" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd">
|
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" bootstrap="Bootstrap.php" colors="true" columns="120" stopOnError="true" stopOnFailure="false" stopOnIncomplete="false" stopOnSkipped="false" beStrictAboutTestsThatDoNotTestAnything="false" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/11.0/phpunit.xsd" cacheDirectory=".phpunit.cache">
|
||||||
<coverage includeUncoveredFiles="true" processUncoveredFiles="false">
|
<coverage includeUncoveredFiles="true">
|
||||||
<include>
|
|
||||||
<directory suffix=".php">../</directory>
|
|
||||||
</include>
|
|
||||||
<exclude>
|
|
||||||
<directory>../vendor*</directory>
|
|
||||||
<directory>../MainRepository*</directory>
|
|
||||||
<directory>../Karaka*</directory>
|
|
||||||
<directory>../Admin/Install/Application*</directory>
|
|
||||||
<directory>../phpOMS*</directory>
|
|
||||||
<directory>../tests*</directory>
|
|
||||||
<directory>../*/tests*</directory>
|
|
||||||
<directory>../**/tests*</directory>
|
|
||||||
<directory>*/tests*</directory>
|
|
||||||
<directory suffix="tpl.php">../*</directory>
|
|
||||||
<directory suffix="lang.php">../*</directory>
|
|
||||||
<directory suffix="Test.php">../*</directory>
|
|
||||||
<directory suffix="Routes.php">../*</directory>
|
|
||||||
<directory suffix="Hooks.php">../*</directory>
|
|
||||||
<directory>../**/test*</directory>
|
|
||||||
<directory>../**/Theme*</directory>
|
|
||||||
<directory>../**/Admin/Routes*</directory>
|
|
||||||
<directory>../**/Admin/Hooks*</directory>
|
|
||||||
<directory>../**/Admin/Install*</directory>
|
|
||||||
<directory>../Media/Files*</directory>
|
|
||||||
</exclude>
|
|
||||||
<report>
|
<report>
|
||||||
<clover outputFile="coverage.xml"/>
|
<clover outputFile="coverage.xml"/>
|
||||||
<html outputDirectory="../tests" lowUpperBound="75" highLowerBound="95"/>
|
<html outputDirectory="../tests" lowUpperBound="75" highLowerBound="95"/>
|
||||||
|
|
@ -56,4 +31,31 @@
|
||||||
<const name="WEB_SERVER_DOCROOT" value="./Karaka"/>
|
<const name="WEB_SERVER_DOCROOT" value="./Karaka"/>
|
||||||
<const name="RESET" value="1"/>
|
<const name="RESET" value="1"/>
|
||||||
</php>
|
</php>
|
||||||
|
<source>
|
||||||
|
<include>
|
||||||
|
<directory suffix=".php">../</directory>
|
||||||
|
</include>
|
||||||
|
<exclude>
|
||||||
|
<directory>../vendor*</directory>
|
||||||
|
<directory>../MainRepository*</directory>
|
||||||
|
<directory>../Karaka*</directory>
|
||||||
|
<directory>../Admin/Install/Application*</directory>
|
||||||
|
<directory>../phpOMS*</directory>
|
||||||
|
<directory>../tests*</directory>
|
||||||
|
<directory>../*/tests*</directory>
|
||||||
|
<directory>../**/tests*</directory>
|
||||||
|
<directory>*/tests*</directory>
|
||||||
|
<directory suffix="tpl.php">../*</directory>
|
||||||
|
<directory suffix="lang.php">../*</directory>
|
||||||
|
<directory suffix="Test.php">../*</directory>
|
||||||
|
<directory suffix="Routes.php">../*</directory>
|
||||||
|
<directory suffix="Hooks.php">../*</directory>
|
||||||
|
<directory>../**/test*</directory>
|
||||||
|
<directory>../**/Theme*</directory>
|
||||||
|
<directory>../**/Admin/Routes*</directory>
|
||||||
|
<directory>../**/Admin/Hooks*</directory>
|
||||||
|
<directory>../**/Admin/Install*</directory>
|
||||||
|
<directory>../Media/Files*</directory>
|
||||||
|
</exclude>
|
||||||
|
</source>
|
||||||
</phpunit>
|
</phpunit>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user