auto generate NullTests

This commit is contained in:
Dennis Eichhorn 2023-10-16 22:25:58 +00:00
parent b1a3fc0428
commit 7e4765ba16
3 changed files with 156 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\EventManagement\tests\Models;
use Modules\EventManagement\Models\NullEventAttribute;
/**
* @internal
*/
final class NullEventAttributeTest extends \PHPUnit\Framework\TestCase
{
/**
* @covers Modules\EventManagement\Models\NullEventAttribute
* @group framework
*/
public function testNull() : void
{
self::assertInstanceOf('\Modules\EventManagement\Models\EventAttribute', new NullEventAttribute());
}
/**
* @covers Modules\EventManagement\Models\NullEventAttribute
* @group framework
*/
public function testId() : void
{
$null = new NullEventAttribute(2);
self::assertEquals(2, $null->getId());
}
/**
* @covers Modules\EventManagement\Models\NullEventAttribute
* @group framework
*/
public function testJsonSerialize() : void
{
$null = new NullEventAttribute(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\EventManagement\tests\Models;
use Modules\EventManagement\Models\NullEventAttributeType;
/**
* @internal
*/
final class NullEventAttributeTypeTest extends \PHPUnit\Framework\TestCase
{
/**
* @covers Modules\EventManagement\Models\NullEventAttributeType
* @group framework
*/
public function testNull() : void
{
self::assertInstanceOf('\Modules\EventManagement\Models\EventAttributeType', new NullEventAttributeType());
}
/**
* @covers Modules\EventManagement\Models\NullEventAttributeType
* @group framework
*/
public function testId() : void
{
$null = new NullEventAttributeType(2);
self::assertEquals(2, $null->getId());
}
/**
* @covers Modules\EventManagement\Models\NullEventAttributeType
* @group framework
*/
public function testJsonSerialize() : void
{
$null = new NullEventAttributeType(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\EventManagement\tests\Models;
use Modules\EventManagement\Models\NullEventAttributeValue;
/**
* @internal
*/
final class NullEventAttributeValueTest extends \PHPUnit\Framework\TestCase
{
/**
* @covers Modules\EventManagement\Models\NullEventAttributeValue
* @group framework
*/
public function testNull() : void
{
self::assertInstanceOf('\Modules\EventManagement\Models\EventAttributeValue', new NullEventAttributeValue());
}
/**
* @covers Modules\EventManagement\Models\NullEventAttributeValue
* @group framework
*/
public function testId() : void
{
$null = new NullEventAttributeValue(2);
self::assertEquals(2, $null->getId());
}
/**
* @covers Modules\EventManagement\Models\NullEventAttributeValue
* @group framework
*/
public function testJsonSerialize() : void
{
$null = new NullEventAttributeValue(2);
self::assertEquals(['id' => 2], $null);
}
}