mirror of
https://github.com/Karaka-Management/oms-ClientManagement.git
synced 2026-01-11 15:28:41 +00:00
upgrade phpunit
This commit is contained in:
parent
161202e809
commit
19d4fffe5f
|
|
@ -24,8 +24,8 @@ trait ApiControllerAttributeTrait
|
|||
{
|
||||
/**
|
||||
* @covers \Modules\ClientManagement\Controller\ApiController
|
||||
* @group module
|
||||
*/
|
||||
#[\PHPUnit\Framework\Attributes\Group('module')]
|
||||
public function testApiClientAttributeTypeCreate() : void
|
||||
{
|
||||
$response = new HttpResponse();
|
||||
|
|
@ -42,8 +42,8 @@ trait ApiControllerAttributeTrait
|
|||
|
||||
/**
|
||||
* @covers \Modules\ClientManagement\Controller\ApiController
|
||||
* @group module
|
||||
*/
|
||||
#[\PHPUnit\Framework\Attributes\Group('module')]
|
||||
public function testApiClientAttributeTypeL11nCreate() : void
|
||||
{
|
||||
$response = new HttpResponse();
|
||||
|
|
@ -60,8 +60,8 @@ trait ApiControllerAttributeTrait
|
|||
|
||||
/**
|
||||
* @covers \Modules\ClientManagement\Controller\ApiController
|
||||
* @group module
|
||||
*/
|
||||
#[\PHPUnit\Framework\Attributes\Group('module')]
|
||||
public function testApiClientAttributeValueIntCreate() : void
|
||||
{
|
||||
$response = new HttpResponse();
|
||||
|
|
@ -80,8 +80,8 @@ trait ApiControllerAttributeTrait
|
|||
|
||||
/**
|
||||
* @covers \Modules\ClientManagement\Controller\ApiController
|
||||
* @group module
|
||||
*/
|
||||
#[\PHPUnit\Framework\Attributes\Group('module')]
|
||||
public function testApiClientAttributeValueStrCreate() : void
|
||||
{
|
||||
$response = new HttpResponse();
|
||||
|
|
@ -99,8 +99,8 @@ trait ApiControllerAttributeTrait
|
|||
|
||||
/**
|
||||
* @covers \Modules\ClientManagement\Controller\ApiController
|
||||
* @group module
|
||||
*/
|
||||
#[\PHPUnit\Framework\Attributes\Group('module')]
|
||||
public function testApiClientAttributeValueFloatCreate() : void
|
||||
{
|
||||
$response = new HttpResponse();
|
||||
|
|
@ -118,8 +118,8 @@ trait ApiControllerAttributeTrait
|
|||
|
||||
/**
|
||||
* @covers \Modules\ClientManagement\Controller\ApiController
|
||||
* @group module
|
||||
*/
|
||||
#[\PHPUnit\Framework\Attributes\Group('module')]
|
||||
public function testApiClientAttributeValueDatCreate() : void
|
||||
{
|
||||
$response = new HttpResponse();
|
||||
|
|
@ -137,8 +137,8 @@ trait ApiControllerAttributeTrait
|
|||
|
||||
/**
|
||||
* @covers \Modules\ClientManagement\Controller\ApiController
|
||||
* @group module
|
||||
*/
|
||||
#[\PHPUnit\Framework\Attributes\Group('module')]
|
||||
public function testApiClientAttributeCreate() : void
|
||||
{
|
||||
$response = new HttpResponse();
|
||||
|
|
@ -155,8 +155,8 @@ trait ApiControllerAttributeTrait
|
|||
|
||||
/**
|
||||
* @covers \Modules\ClientManagement\Controller\ApiController
|
||||
* @group module
|
||||
*/
|
||||
#[\PHPUnit\Framework\Attributes\Group('module')]
|
||||
public function testApiClientAttributeValueCreateInvalidData() : void
|
||||
{
|
||||
$response = new HttpResponse();
|
||||
|
|
@ -171,8 +171,8 @@ trait ApiControllerAttributeTrait
|
|||
|
||||
/**
|
||||
* @covers \Modules\ClientManagement\Controller\ApiController
|
||||
* @group module
|
||||
*/
|
||||
#[\PHPUnit\Framework\Attributes\Group('module')]
|
||||
public function testApiClientAttributeTypeCreateInvalidData() : void
|
||||
{
|
||||
$response = new HttpResponse();
|
||||
|
|
@ -187,8 +187,8 @@ trait ApiControllerAttributeTrait
|
|||
|
||||
/**
|
||||
* @covers \Modules\ClientManagement\Controller\ApiController
|
||||
* @group module
|
||||
*/
|
||||
#[\PHPUnit\Framework\Attributes\Group('module')]
|
||||
public function testApiClientAttributeTypeL11nCreateInvalidData() : void
|
||||
{
|
||||
$response = new HttpResponse();
|
||||
|
|
@ -203,8 +203,8 @@ trait ApiControllerAttributeTrait
|
|||
|
||||
/**
|
||||
* @covers \Modules\ClientManagement\Controller\ApiController
|
||||
* @group module
|
||||
*/
|
||||
#[\PHPUnit\Framework\Attributes\Group('module')]
|
||||
public function testApiClientAttributeCreateInvalidData() : void
|
||||
{
|
||||
$response = new HttpResponse();
|
||||
|
|
|
|||
|
|
@ -36,8 +36,8 @@ trait ApiControllerClientTrait
|
|||
|
||||
/**
|
||||
* @covers \Modules\ClientManagement\Controller\ApiController
|
||||
* @group module
|
||||
*/
|
||||
#[\PHPUnit\Framework\Attributes\Group('module')]
|
||||
public function testApiClientCreate() : void
|
||||
{
|
||||
$response = new HttpResponse();
|
||||
|
|
@ -59,8 +59,8 @@ trait ApiControllerClientTrait
|
|||
|
||||
/**
|
||||
* @covers \Modules\ClientManagement\Controller\ApiController
|
||||
* @group module
|
||||
*/
|
||||
#[\PHPUnit\Framework\Attributes\Group('module')]
|
||||
public function testApiClientCreateInvalidData() : void
|
||||
{
|
||||
$response = new HttpResponse();
|
||||
|
|
@ -75,8 +75,8 @@ trait ApiControllerClientTrait
|
|||
|
||||
/**
|
||||
* @covers \Modules\ClientManagement\Controller\ApiController
|
||||
* @group module
|
||||
*/
|
||||
#[\PHPUnit\Framework\Attributes\Group('module')]
|
||||
public function testApiClientProfileImageCreate() : void
|
||||
{
|
||||
$response = new HttpResponse();
|
||||
|
|
@ -106,8 +106,8 @@ trait ApiControllerClientTrait
|
|||
|
||||
/**
|
||||
* @covers \Modules\ClientManagement\Controller\ApiController
|
||||
* @group module
|
||||
*/
|
||||
#[\PHPUnit\Framework\Attributes\Group('module')]
|
||||
public function testApiClientFileCreate() : void
|
||||
{
|
||||
$response = new HttpResponse();
|
||||
|
|
@ -136,8 +136,8 @@ trait ApiControllerClientTrait
|
|||
|
||||
/**
|
||||
* @covers \Modules\ClientManagement\Controller\ApiController
|
||||
* @group module
|
||||
*/
|
||||
#[\PHPUnit\Framework\Attributes\Group('module')]
|
||||
public function testApiClientNoteCreate() : void
|
||||
{
|
||||
$response = new HttpResponse();
|
||||
|
|
@ -157,8 +157,8 @@ trait ApiControllerClientTrait
|
|||
|
||||
/**
|
||||
* @covers \Modules\ClientManagement\Controller\ApiController
|
||||
* @group module
|
||||
*/
|
||||
#[\PHPUnit\Framework\Attributes\Group('module')]
|
||||
public function testApiFileCreateInvalidData() : void
|
||||
{
|
||||
$response = new HttpResponse();
|
||||
|
|
|
|||
|
|
@ -32,10 +32,9 @@ use phpOMS\Router\WebRouter;
|
|||
use phpOMS\Utils\TestUtils;
|
||||
|
||||
/**
|
||||
* @testdox Modules\ClientManagement\tests\Controller\ApiControllerTest: ClientManagement api controller
|
||||
*
|
||||
* @internal
|
||||
*/
|
||||
#[\PHPUnit\Framework\Attributes\TestDox('Modules\ClientManagement\tests\Controller\ApiControllerTest: ClientManagement api controller')]
|
||||
final class ApiControllerTest extends \PHPUnit\Framework\TestCase
|
||||
{
|
||||
protected ApplicationAbstract $app;
|
||||
|
|
|
|||
|
|
@ -23,12 +23,10 @@ use Modules\Profile\Models\ProfileMapper;
|
|||
/**
|
||||
* @internal
|
||||
*/
|
||||
#[\PHPUnit\Framework\Attributes\CoversClass(\Modules\ClientManagement\Models\ClientMapper::class)]
|
||||
final class ClientMapperTest extends \PHPUnit\Framework\TestCase
|
||||
{
|
||||
/**
|
||||
* @covers \Modules\ClientManagement\Models\ClientMapper
|
||||
* @group module
|
||||
*/
|
||||
#[\PHPUnit\Framework\Attributes\Group('module')]
|
||||
public function testCR() : void
|
||||
{
|
||||
$client = new Client();
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@ use Modules\Editor\Models\EditorDoc;
|
|||
/**
|
||||
* @internal
|
||||
*/
|
||||
#[\PHPUnit\Framework\Attributes\CoversClass(\Modules\ClientManagement\Models\Client::class)]
|
||||
final class ClientTest extends \PHPUnit\Framework\TestCase
|
||||
{
|
||||
private Client $client;
|
||||
|
|
@ -33,10 +34,7 @@ final class ClientTest extends \PHPUnit\Framework\TestCase
|
|||
$this->client = new Client();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers \Modules\ClientManagement\Models\Client
|
||||
* @group module
|
||||
*/
|
||||
#[\PHPUnit\Framework\Attributes\Group('module')]
|
||||
public function testDefault() : void
|
||||
{
|
||||
self::assertEquals(0, $this->client->id);
|
||||
|
|
@ -52,20 +50,14 @@ final class ClientTest extends \PHPUnit\Framework\TestCase
|
|||
self::assertInstanceOf('\phpOMS\Stdlib\Base\Address', $this->client->mainAddress);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers \Modules\ClientManagement\Models\Client
|
||||
* @group module
|
||||
*/
|
||||
#[\PHPUnit\Framework\Attributes\Group('module')]
|
||||
public function testNoteInputOutput() : void
|
||||
{
|
||||
$this->client->addNote(new EditorDoc());
|
||||
self::assertCount(1, $this->client->getNotes());
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers \Modules\ClientManagement\Models\Client
|
||||
* @group module
|
||||
*/
|
||||
#[\PHPUnit\Framework\Attributes\Group('module')]
|
||||
public function testSerialize() : void
|
||||
{
|
||||
$this->client->number = '123456';
|
||||
|
|
|
|||
|
|
@ -19,31 +19,23 @@ use Modules\ClientManagement\Models\NullClient;
|
|||
/**
|
||||
* @internal
|
||||
*/
|
||||
#[\PHPUnit\Framework\Attributes\CoversClass(\Modules\ClientManagement\Models\NullClient::class)]
|
||||
final class NullClientTest extends \PHPUnit\Framework\TestCase
|
||||
{
|
||||
/**
|
||||
* @covers \Modules\ClientManagement\Models\NullClient
|
||||
* @group module
|
||||
*/
|
||||
#[\PHPUnit\Framework\Attributes\Group('module')]
|
||||
public function testNull() : void
|
||||
{
|
||||
self::assertInstanceOf('\Modules\ClientManagement\Models\Client', new NullClient());
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers \Modules\ClientManagement\Models\NullClient
|
||||
* @group module
|
||||
*/
|
||||
#[\PHPUnit\Framework\Attributes\Group('module')]
|
||||
public function testId() : void
|
||||
{
|
||||
$null = new NullClient(2);
|
||||
self::assertEquals(2, $null->id);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers \Modules\ClientManagement\Models\NullClient
|
||||
* @group module
|
||||
*/
|
||||
#[\PHPUnit\Framework\Attributes\Group('module')]
|
||||
public function testJsonSerialize() : void
|
||||
{
|
||||
$null = new NullClient(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