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