mirror of
https://github.com/Karaka-Management/oms-Knowledgebase.git
synced 2026-01-11 17:38:40 +00:00
46 lines
1.1 KiB
PHP
Executable File
46 lines
1.1 KiB
PHP
Executable File
<?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\Knowledgebase\tests\Models;
|
|
|
|
use Modules\Knowledgebase\Models\WikiApp;
|
|
use Modules\Knowledgebase\Models\WikiAppMapper;
|
|
|
|
/**
|
|
* @testdox Modules\tests\Knowledgebase\Models\WikiAppMapperTest: Wiki application mapper
|
|
*
|
|
* @internal
|
|
*/
|
|
final class WikiAppMapperTest extends \PHPUnit\Framework\TestCase
|
|
{
|
|
/**
|
|
* @testdox The model can be created and read from the database
|
|
* @covers Modules\Knowledgebase\Models\WikiAppMapper
|
|
* @group module
|
|
*/
|
|
public function testCR() : void
|
|
{
|
|
$app = new WikiApp();
|
|
|
|
$app->name = 'Test Category';
|
|
|
|
$id = WikiAppMapper::create()->execute($app);
|
|
self::assertGreaterThan(0, $app->getId());
|
|
self::assertEquals($id, $app->getId());
|
|
|
|
$appR = WikiAppMapper::get()->where('id', $app->getId())->execute();
|
|
self::assertEquals($app->name, $appR->name);
|
|
}
|
|
}
|