auto generate NullTests

This commit is contained in:
Dennis Eichhorn 2023-10-16 22:25:58 +00:00
parent 577ee09ee6
commit c8a920b21b
2 changed files with 104 additions and 0 deletions

View File

@ -0,0 +1,52 @@
<?php
/**
* Jingga
*
* PHP Version 8.1
*
* @package tests
* @copyright Dennis Eichhorn
* @license OMS License 2.0
* @version 1.0.0
* @link https://jingga.app
*/
declare(strict_types=1);
namespace Modules\Workflow\tests\Models;
use Modules\Workflow\Models\NullWorkflowInstanceAbstract;
/**
* @internal
*/
final class NullWorkflowInstanceAbstractTest extends \PHPUnit\Framework\TestCase
{
/**
* @covers Modules\Workflow\Models\NullWorkflowInstanceAbstract
* @group framework
*/
public function testNull() : void
{
self::assertInstanceOf('\Modules\Workflow\Models\WorkflowInstanceAbstract', new NullWorkflowInstanceAbstract());
}
/**
* @covers Modules\Workflow\Models\NullWorkflowInstanceAbstract
* @group framework
*/
public function testId() : void
{
$null = new NullWorkflowInstanceAbstract(2);
self::assertEquals(2, $null->getId());
}
/**
* @covers Modules\Workflow\Models\NullWorkflowInstanceAbstract
* @group framework
*/
public function testJsonSerialize() : void
{
$null = new NullWorkflowInstanceAbstract(2);
self::assertEquals(['id' => 2], $null);
}
}

View File

@ -0,0 +1,52 @@
<?php
/**
* Jingga
*
* PHP Version 8.1
*
* @package tests
* @copyright Dennis Eichhorn
* @license OMS License 2.0
* @version 1.0.0
* @link https://jingga.app
*/
declare(strict_types=1);
namespace Modules\Workflow\tests\Models;
use Modules\Workflow\Models\NullWorkflowTemplate;
/**
* @internal
*/
final class NullWorkflowTemplateTest extends \PHPUnit\Framework\TestCase
{
/**
* @covers Modules\Workflow\Models\NullWorkflowTemplate
* @group framework
*/
public function testNull() : void
{
self::assertInstanceOf('\Modules\Workflow\Models\WorkflowTemplate', new NullWorkflowTemplate());
}
/**
* @covers Modules\Workflow\Models\NullWorkflowTemplate
* @group framework
*/
public function testId() : void
{
$null = new NullWorkflowTemplate(2);
self::assertEquals(2, $null->getId());
}
/**
* @covers Modules\Workflow\Models\NullWorkflowTemplate
* @group framework
*/
public function testJsonSerialize() : void
{
$null = new NullWorkflowTemplate(2);
self::assertEquals(['id' => 2], $null);
}
}