mirror of
https://github.com/Karaka-Management/oms-ContractManagement.git
synced 2026-01-11 01:28:40 +00:00
upgrade phpunit
This commit is contained in:
parent
1db41f7a3c
commit
2d5cc77bc8
|
|
@ -24,8 +24,8 @@ trait ApiControllerAttributeTrait
|
|||
{
|
||||
/**
|
||||
* @covers \Modules\ContractManagement\Controller\ApiController
|
||||
* @group module
|
||||
*/
|
||||
#[\PHPUnit\Framework\Attributes\Group('module')]
|
||||
public function testApiContractAttributeTypeCreate() : void
|
||||
{
|
||||
$response = new HttpResponse();
|
||||
|
|
@ -42,8 +42,8 @@ trait ApiControllerAttributeTrait
|
|||
|
||||
/**
|
||||
* @covers \Modules\ContractManagement\Controller\ApiController
|
||||
* @group module
|
||||
*/
|
||||
#[\PHPUnit\Framework\Attributes\Group('module')]
|
||||
public function testApiContractAttributeTypeL11nCreate() : void
|
||||
{
|
||||
$response = new HttpResponse();
|
||||
|
|
@ -60,8 +60,8 @@ trait ApiControllerAttributeTrait
|
|||
|
||||
/**
|
||||
* @covers \Modules\ContractManagement\Controller\ApiController
|
||||
* @group module
|
||||
*/
|
||||
#[\PHPUnit\Framework\Attributes\Group('module')]
|
||||
public function testApiContractAttributeValueIntCreate() : void
|
||||
{
|
||||
$response = new HttpResponse();
|
||||
|
|
@ -80,8 +80,8 @@ trait ApiControllerAttributeTrait
|
|||
|
||||
/**
|
||||
* @covers \Modules\ContractManagement\Controller\ApiController
|
||||
* @group module
|
||||
*/
|
||||
#[\PHPUnit\Framework\Attributes\Group('module')]
|
||||
public function testApiContractAttributeValueStrCreate() : void
|
||||
{
|
||||
$response = new HttpResponse();
|
||||
|
|
@ -99,8 +99,8 @@ trait ApiControllerAttributeTrait
|
|||
|
||||
/**
|
||||
* @covers \Modules\ContractManagement\Controller\ApiController
|
||||
* @group module
|
||||
*/
|
||||
#[\PHPUnit\Framework\Attributes\Group('module')]
|
||||
public function testApiContractAttributeValueFloatCreate() : void
|
||||
{
|
||||
$response = new HttpResponse();
|
||||
|
|
@ -118,8 +118,8 @@ trait ApiControllerAttributeTrait
|
|||
|
||||
/**
|
||||
* @covers \Modules\ContractManagement\Controller\ApiController
|
||||
* @group module
|
||||
*/
|
||||
#[\PHPUnit\Framework\Attributes\Group('module')]
|
||||
public function testApiContractAttributeValueDatCreate() : void
|
||||
{
|
||||
$response = new HttpResponse();
|
||||
|
|
@ -137,8 +137,8 @@ trait ApiControllerAttributeTrait
|
|||
|
||||
/**
|
||||
* @covers \Modules\ContractManagement\Controller\ApiController
|
||||
* @group module
|
||||
*/
|
||||
#[\PHPUnit\Framework\Attributes\Group('module')]
|
||||
public function testApiContractAttributeCreate() : void
|
||||
{
|
||||
$response = new HttpResponse();
|
||||
|
|
@ -155,8 +155,8 @@ trait ApiControllerAttributeTrait
|
|||
|
||||
/**
|
||||
* @covers \Modules\ContractManagement\Controller\ApiController
|
||||
* @group module
|
||||
*/
|
||||
#[\PHPUnit\Framework\Attributes\Group('module')]
|
||||
public function testApiContractAttributeValueCreateInvalidData() : void
|
||||
{
|
||||
$response = new HttpResponse();
|
||||
|
|
@ -171,8 +171,8 @@ trait ApiControllerAttributeTrait
|
|||
|
||||
/**
|
||||
* @covers \Modules\ContractManagement\Controller\ApiController
|
||||
* @group module
|
||||
*/
|
||||
#[\PHPUnit\Framework\Attributes\Group('module')]
|
||||
public function testApiContractAttributeTypeCreateInvalidData() : void
|
||||
{
|
||||
$response = new HttpResponse();
|
||||
|
|
@ -187,8 +187,8 @@ trait ApiControllerAttributeTrait
|
|||
|
||||
/**
|
||||
* @covers \Modules\ContractManagement\Controller\ApiController
|
||||
* @group module
|
||||
*/
|
||||
#[\PHPUnit\Framework\Attributes\Group('module')]
|
||||
public function testApiContractAttributeTypeL11nCreateInvalidData() : void
|
||||
{
|
||||
$response = new HttpResponse();
|
||||
|
|
@ -203,8 +203,8 @@ trait ApiControllerAttributeTrait
|
|||
|
||||
/**
|
||||
* @covers \Modules\ContractManagement\Controller\ApiController
|
||||
* @group module
|
||||
*/
|
||||
#[\PHPUnit\Framework\Attributes\Group('module')]
|
||||
public function testApiContractAttributeCreateInvalidData() : void
|
||||
{
|
||||
$response = new HttpResponse();
|
||||
|
|
|
|||
|
|
@ -23,8 +23,8 @@ trait ApiControllerContractTrait
|
|||
{
|
||||
/**
|
||||
* @covers \Modules\ContractManagement\Controller\ApiController
|
||||
* @group module
|
||||
*/
|
||||
#[\PHPUnit\Framework\Attributes\Group('module')]
|
||||
public function testApiContractCreate() : void
|
||||
{
|
||||
$response = new HttpResponse();
|
||||
|
|
@ -43,8 +43,8 @@ trait ApiControllerContractTrait
|
|||
|
||||
/**
|
||||
* @covers \Modules\ContractManagement\Controller\ApiController
|
||||
* @group module
|
||||
*/
|
||||
#[\PHPUnit\Framework\Attributes\Group('module')]
|
||||
public function testApiContractCreateInvalidData() : void
|
||||
{
|
||||
$response = new HttpResponse();
|
||||
|
|
@ -59,8 +59,8 @@ trait ApiControllerContractTrait
|
|||
|
||||
/**
|
||||
* @covers \Modules\ContractManagement\Controller\ApiController
|
||||
* @group module
|
||||
*/
|
||||
#[\PHPUnit\Framework\Attributes\Group('module')]
|
||||
public function testApiContractDocCreate() : void
|
||||
{
|
||||
$response = new HttpResponse();
|
||||
|
|
@ -90,8 +90,8 @@ trait ApiControllerContractTrait
|
|||
|
||||
/**
|
||||
* @covers \Modules\ContractManagement\Controller\ApiController
|
||||
* @group module
|
||||
*/
|
||||
#[\PHPUnit\Framework\Attributes\Group('module')]
|
||||
public function testApiContractDocCreateInvalidData() : void
|
||||
{
|
||||
$response = new HttpResponse();
|
||||
|
|
|
|||
|
|
@ -23,8 +23,8 @@ trait ApiControllerContractTypeTrait
|
|||
{
|
||||
/**
|
||||
* @covers \Modules\ContractManagement\Controller\ApiController
|
||||
* @group module
|
||||
*/
|
||||
#[\PHPUnit\Framework\Attributes\Group('module')]
|
||||
public function testApiContractTypeCreate() : void
|
||||
{
|
||||
$response = new HttpResponse();
|
||||
|
|
@ -40,8 +40,8 @@ trait ApiControllerContractTypeTrait
|
|||
|
||||
/**
|
||||
* @covers \Modules\ContractManagement\Controller\ApiController
|
||||
* @group module
|
||||
*/
|
||||
#[\PHPUnit\Framework\Attributes\Group('module')]
|
||||
public function testApiContractTypeCreateInvalidData() : void
|
||||
{
|
||||
$response = new HttpResponse();
|
||||
|
|
@ -56,8 +56,8 @@ trait ApiControllerContractTypeTrait
|
|||
|
||||
/**
|
||||
* @covers \Modules\ContractManagement\Controller\ApiController
|
||||
* @group module
|
||||
*/
|
||||
#[\PHPUnit\Framework\Attributes\Group('module')]
|
||||
public function testApiContractTypeL11nCreate() : void
|
||||
{
|
||||
$response = new HttpResponse();
|
||||
|
|
@ -74,8 +74,8 @@ trait ApiControllerContractTypeTrait
|
|||
|
||||
/**
|
||||
* @covers \Modules\ContractManagement\Controller\ApiController
|
||||
* @group module
|
||||
*/
|
||||
#[\PHPUnit\Framework\Attributes\Group('module')]
|
||||
public function testApiContractTypeL11nCreateInvalidData() : void
|
||||
{
|
||||
$response = new HttpResponse();
|
||||
|
|
|
|||
|
|
@ -33,10 +33,9 @@ use phpOMS\Router\WebRouter;
|
|||
use phpOMS\Utils\TestUtils;
|
||||
|
||||
/**
|
||||
* @testdox Modules\ContractManagement\tests\Controller\ApiControllerTest: ContractManagement api controller
|
||||
*
|
||||
* @internal
|
||||
*/
|
||||
#[\PHPUnit\Framework\Attributes\TestDox('Modules\ContractManagement\tests\Controller\ApiControllerTest: ContractManagement api controller')]
|
||||
final class ApiControllerTest extends \PHPUnit\Framework\TestCase
|
||||
{
|
||||
protected ApplicationAbstract $app;
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@ use Modules\ContractManagement\Models\Contract;
|
|||
/**
|
||||
* @internal
|
||||
*/
|
||||
#[\PHPUnit\Framework\Attributes\CoversClass(\Modules\ContractManagement\Models\Contract::class)]
|
||||
final class ContractTest extends \PHPUnit\Framework\TestCase
|
||||
{
|
||||
private Contract $contract;
|
||||
|
|
@ -31,20 +32,14 @@ final class ContractTest extends \PHPUnit\Framework\TestCase
|
|||
$this->contract = new Contract();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers \Modules\ContractManagement\Models\Contract
|
||||
* @group module
|
||||
*/
|
||||
#[\PHPUnit\Framework\Attributes\Group('module')]
|
||||
public function testDefault() : void
|
||||
{
|
||||
self::assertEquals(0, $this->contract->id);
|
||||
self::assertEquals([], $this->contract->files);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers \Modules\ContractManagement\Models\Contract
|
||||
* @group module
|
||||
*/
|
||||
#[\PHPUnit\Framework\Attributes\Group('module')]
|
||||
public function testSerialize() : void
|
||||
{
|
||||
$this->contract->title = 'Title';
|
||||
|
|
|
|||
|
|
@ -19,31 +19,23 @@ use Modules\ContractManagement\Models\NullContract;
|
|||
/**
|
||||
* @internal
|
||||
*/
|
||||
#[\PHPUnit\Framework\Attributes\CoversClass(\Modules\ContractManagement\Models\NullContract::class)]
|
||||
final class NullContractTest extends \PHPUnit\Framework\TestCase
|
||||
{
|
||||
/**
|
||||
* @covers \Modules\ContractManagement\Models\NullContract
|
||||
* @group module
|
||||
*/
|
||||
#[\PHPUnit\Framework\Attributes\Group('module')]
|
||||
public function testNull() : void
|
||||
{
|
||||
self::assertInstanceOf('\Modules\ContractManagement\Models\Contract', new NullContract());
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers \Modules\ContractManagement\Models\NullContract
|
||||
* @group module
|
||||
*/
|
||||
#[\PHPUnit\Framework\Attributes\Group('module')]
|
||||
public function testId() : void
|
||||
{
|
||||
$null = new NullContract(2);
|
||||
self::assertEquals(2, $null->id);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers \Modules\ContractManagement\Models\NullContract
|
||||
* @group module
|
||||
*/
|
||||
#[\PHPUnit\Framework\Attributes\Group('module')]
|
||||
public function testJsonSerialize() : void
|
||||
{
|
||||
$null = new NullContract(2);
|
||||
|
|
|
|||
|
|
@ -1,31 +1,6 @@
|
|||
<?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">
|
||||
<coverage includeUncoveredFiles="true" processUncoveredFiles="false">
|
||||
<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>
|
||||
<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">
|
||||
<report>
|
||||
<clover outputFile="coverage.xml"/>
|
||||
<html outputDirectory="../tests" lowUpperBound="75" highLowerBound="95"/>
|
||||
|
|
@ -56,4 +31,31 @@
|
|||
<const name="WEB_SERVER_DOCROOT" value="./Karaka"/>
|
||||
<const name="RESET" value="1"/>
|
||||
</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>
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user