more tests and make classes final

This commit is contained in:
Dennis Eichhorn 2021-10-21 22:16:06 +02:00
parent 599bd0861b
commit 443eb647a1
6 changed files with 237 additions and 0 deletions

27
tests/Admin/AdminTest.php Normal file
View File

@ -0,0 +1,27 @@
<?php
/**
* Orange Management
*
* PHP Version 8.0
*
* @package tests
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/
declare(strict_types=1);
namespace Modules\ContractManagement\tests\Admin;
/**
* @internal
*/
class AdminTest extends \PHPUnit\Framework\TestCase
{
protected const NAME = 'ContractManagement';
protected const URI_LOAD = '';
use \Modules\tests\ModuleTestTrait;
}

View File

@ -0,0 +1,42 @@
<?php
/**
* Orange Management
*
* PHP Version 8.0
*
* @package tests
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/
declare(strict_types=1);
namespace Modules\ContractManagement\tests\Models;
use Modules\ContractManagement\Models\NullContract;
/**
* @internal
*/
final class Null extends \PHPUnit\Framework\TestCase
{
/**
* @covers Modules\ContractManagement\Models\NullContract
* @group framework
*/
public function testNull() : void
{
self::assertInstanceOf('\Modules\ContractManagement\Models\Contract', new NullContract());
}
/**
* @covers Modules\ContractManagement\Models\NullContract
* @group framework
*/
public function testId() : void
{
$null = new NullContract(2);
self::assertEquals(2, $null->getId());
}
}

View File

@ -0,0 +1,42 @@
<?php
/**
* Orange Management
*
* PHP Version 8.0
*
* @package tests
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/
declare(strict_types=1);
namespace Modules\ContractManagement\tests\Models;
use Modules\ContractManagement\Models\NullContract;
/**
* @internal
*/
final class NullContractTest extends \PHPUnit\Framework\TestCase
{
/**
* @covers Modules\ContractManagement\Models\NullContract
* @group framework
*/
public function testNull() : void
{
self::assertInstanceOf('\Modules\ContractManagement\Models\Contract', new NullContract());
}
/**
* @covers Modules\ContractManagement\Models\NullContract
* @group framework
*/
public function testId() : void
{
$null = new NullContract(2);
self::assertEquals(2, $null->getId());
}
}

View File

@ -0,0 +1,42 @@
<?php
/**
* Orange Management
*
* PHP Version 8.0
*
* @package tests
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/
declare(strict_types=1);
namespace Modules\ContractManagement\tests\Models;
use Modules\ContractManagement\Models\NullContractType;
/**
* @internal
*/
final class Null extends \PHPUnit\Framework\TestCase
{
/**
* @covers Modules\ContractManagement\Models\NullContractType
* @group framework
*/
public function testNull() : void
{
self::assertInstanceOf('\Modules\ContractManagement\Models\ContractType', new NullContractType());
}
/**
* @covers Modules\ContractManagement\Models\NullContractType
* @group framework
*/
public function testId() : void
{
$null = new NullContractType(2);
self::assertEquals(2, $null->getId());
}
}

View File

@ -0,0 +1,42 @@
<?php
/**
* Orange Management
*
* PHP Version 8.0
*
* @package tests
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/
declare(strict_types=1);
namespace Modules\ContractManagement\tests\Models;
use Modules\ContractManagement\Models\NullContractTypeL11n;
/**
* @internal
*/
final class NullContractTypeL11nTest extends \PHPUnit\Framework\TestCase
{
/**
* @covers Modules\ContractManagement\Models\NullContractTypeL11n
* @group framework
*/
public function testNull() : void
{
self::assertInstanceOf('\Modules\ContractManagement\Models\ContractTypeL11n', new NullContractTypeL11n());
}
/**
* @covers Modules\ContractManagement\Models\NullContractTypeL11n
* @group framework
*/
public function testId() : void
{
$null = new NullContractTypeL11n(2);
self::assertEquals(2, $null->getId());
}
}

View File

@ -0,0 +1,42 @@
<?php
/**
* Orange Management
*
* PHP Version 8.0
*
* @package tests
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/
declare(strict_types=1);
namespace Modules\ContractManagement\tests\Models;
use Modules\ContractManagement\Models\NullContractType;
/**
* @internal
*/
final class NullContractTypeTest extends \PHPUnit\Framework\TestCase
{
/**
* @covers Modules\ContractManagement\Models\NullContractType
* @group framework
*/
public function testNull() : void
{
self::assertInstanceOf('\Modules\ContractManagement\Models\ContractType', new NullContractType());
}
/**
* @covers Modules\ContractManagement\Models\NullContractType
* @group framework
*/
public function testId() : void
{
$null = new NullContractType(2);
self::assertEquals(2, $null->getId());
}
}