oms-RiskManagement/tests/Models/CategoryMapperTest.php
Dennis Eichhorn cf7e83019e
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
Test fixes
2024-05-16 02:14:55 +00:00

40 lines
999 B
PHP
Executable File

<?php
/**
* Jingga
*
* PHP Version 8.2
*
* @package tests
* @copyright Dennis Eichhorn
* @license OMS License 2.0
* @version 1.0.0
* @link https://jingga.app
*/
declare(strict_types=1);
namespace Modules\RiskManagement\tests\Models;
use Modules\RiskManagement\Models\Category;
use Modules\RiskManagement\Models\CategoryMapper;
/**
* @internal
*/
#[\PHPUnit\Framework\Attributes\CoversClass(\Modules\RiskManagement\Models\CategoryMapper::class)]
final class CategoryMapperTest extends \PHPUnit\Framework\TestCase
{
#[\PHPUnit\Framework\Attributes\Group('module')]
public function testCRUD() : void
{
$obj = new Category();
$obj->responsible = 1;
$obj->deputy = 1;
CategoryMapper::create()->execute($obj);
$objR = CategoryMapper::get()->where('id', $obj->id)->execute();
self::assertEquals($obj->responsible, $objR->responsible);
self::assertEquals($obj->deputy, $objR->deputy);
}
}