oms-Accounting/tests/Models/NullCostObjectTest.php
Dennis Eichhorn 94a4855b91
Some checks failed
Image optimization / general_image_workflow (push) Has been cancelled
CI / general_module_workflow_php (push) Has been cancelled
CI / general_module_workflow_js (push) Has been cancelled
fix version and bugs
2024-05-21 00:09:05 +02:00

45 lines
1.1 KiB
PHP
Executable File

<?php
/**
* Jingga
*
* PHP Version 8.2
*
* @package tests
* @copyright Dennis Eichhorn
* @license OMS License 2.2
* @version 1.0.0
* @link https://jingga.app
*/
declare(strict_types=1);
namespace Modules\Accounting\tests\Models;
use Modules\Accounting\Models\NullCostObject;
/**
* @internal
*/
#[\PHPUnit\Framework\Attributes\CoversClass(\Modules\Accounting\Models\NullCostObject::class)]
final class NullCostObjectTest extends \PHPUnit\Framework\TestCase
{
#[\PHPUnit\Framework\Attributes\Group('module')]
public function testNull() : void
{
self::assertInstanceOf('\Modules\Accounting\Models\CostObject', new NullCostObject());
}
#[\PHPUnit\Framework\Attributes\Group('module')]
public function testId() : void
{
$null = new NullCostObject(2);
self::assertEquals(2, $null->id);
}
#[\PHPUnit\Framework\Attributes\Group('module')]
public function testJsonSerialize() : void
{
$null = new NullCostObject(2);
self::assertEquals(['id' => 2], $null->jsonSerialize());
}
}