Skip to content

Commit

Permalink
auto generate NullTests
Browse files Browse the repository at this point in the history
  • Loading branch information
Dennis Eichhorn committed Oct 16, 2023
1 parent ef17151 commit b2a009f
Show file tree
Hide file tree
Showing 6 changed files with 312 additions and 0 deletions.
52 changes: 52 additions & 0 deletions tests/Models/NullAccountRelationTest.php
Original file line number Diff line number Diff line change
@@ -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\Tasks\tests\Models;

use Modules\Tasks\Models\NullAccountRelation;

/**
* @internal
*/
final class NullAccountRelationTest extends \PHPUnit\Framework\TestCase
{
/**
* @covers Modules\Tasks\Models\NullAccountRelation
* @group framework
*/
public function testNull() : void
{
self::assertInstanceOf('\Modules\Tasks\Models\AccountRelation', new NullAccountRelation());
}

/**
* @covers Modules\Tasks\Models\NullAccountRelation
* @group framework
*/
public function testId() : void
{
$null = new NullAccountRelation(2);
self::assertEquals(2, $null->getId());
}

/**
* @covers Modules\Tasks\Models\NullAccountRelation
* @group framework
*/
public function testJsonSerialize() : void
{
$null = new NullAccountRelation(2);
self::assertEquals(['id' => 2], $null);
}
}
52 changes: 52 additions & 0 deletions tests/Models/NullGroupRelationTest.php
Original file line number Diff line number Diff line change
@@ -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\Tasks\tests\Models;

use Modules\Tasks\Models\NullGroupRelation;

/**
* @internal
*/
final class NullGroupRelationTest extends \PHPUnit\Framework\TestCase
{
/**
* @covers Modules\Tasks\Models\NullGroupRelation
* @group framework
*/
public function testNull() : void
{
self::assertInstanceOf('\Modules\Tasks\Models\GroupRelation', new NullGroupRelation());
}

/**
* @covers Modules\Tasks\Models\NullGroupRelation
* @group framework
*/
public function testId() : void
{
$null = new NullGroupRelation(2);
self::assertEquals(2, $null->getId());
}

/**
* @covers Modules\Tasks\Models\NullGroupRelation
* @group framework
*/
public function testJsonSerialize() : void
{
$null = new NullGroupRelation(2);
self::assertEquals(['id' => 2], $null);
}
}
52 changes: 52 additions & 0 deletions tests/Models/NullTaskAttributeTest.php
Original file line number Diff line number Diff line change
@@ -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\Tasks\tests\Models;

use Modules\Tasks\Models\NullTaskAttribute;

/**
* @internal
*/
final class NullTaskAttributeTest extends \PHPUnit\Framework\TestCase
{
/**
* @covers Modules\Tasks\Models\NullTaskAttribute
* @group framework
*/
public function testNull() : void
{
self::assertInstanceOf('\Modules\Tasks\Models\TaskAttribute', new NullTaskAttribute());
}

/**
* @covers Modules\Tasks\Models\NullTaskAttribute
* @group framework
*/
public function testId() : void
{
$null = new NullTaskAttribute(2);
self::assertEquals(2, $null->getId());
}

/**
* @covers Modules\Tasks\Models\NullTaskAttribute
* @group framework
*/
public function testJsonSerialize() : void
{
$null = new NullTaskAttribute(2);
self::assertEquals(['id' => 2], $null);
}
}
52 changes: 52 additions & 0 deletions tests/Models/NullTaskAttributeTypeTest.php
Original file line number Diff line number Diff line change
@@ -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\Tasks\tests\Models;

use Modules\Tasks\Models\NullTaskAttributeType;

/**
* @internal
*/
final class NullTaskAttributeTypeTest extends \PHPUnit\Framework\TestCase
{
/**
* @covers Modules\Tasks\Models\NullTaskAttributeType
* @group framework
*/
public function testNull() : void
{
self::assertInstanceOf('\Modules\Tasks\Models\TaskAttributeType', new NullTaskAttributeType());
}

/**
* @covers Modules\Tasks\Models\NullTaskAttributeType
* @group framework
*/
public function testId() : void
{
$null = new NullTaskAttributeType(2);
self::assertEquals(2, $null->getId());
}

/**
* @covers Modules\Tasks\Models\NullTaskAttributeType
* @group framework
*/
public function testJsonSerialize() : void
{
$null = new NullTaskAttributeType(2);
self::assertEquals(['id' => 2], $null);
}
}
52 changes: 52 additions & 0 deletions tests/Models/NullTaskAttributeValueTest.php
Original file line number Diff line number Diff line change
@@ -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\Tasks\tests\Models;

use Modules\Tasks\Models\NullTaskAttributeValue;

/**
* @internal
*/
final class NullTaskAttributeValueTest extends \PHPUnit\Framework\TestCase
{
/**
* @covers Modules\Tasks\Models\NullTaskAttributeValue
* @group framework
*/
public function testNull() : void
{
self::assertInstanceOf('\Modules\Tasks\Models\TaskAttributeValue', new NullTaskAttributeValue());
}

/**
* @covers Modules\Tasks\Models\NullTaskAttributeValue
* @group framework
*/
public function testId() : void
{
$null = new NullTaskAttributeValue(2);
self::assertEquals(2, $null->getId());
}

/**
* @covers Modules\Tasks\Models\NullTaskAttributeValue
* @group framework
*/
public function testJsonSerialize() : void
{
$null = new NullTaskAttributeValue(2);
self::assertEquals(['id' => 2], $null);
}
}
52 changes: 52 additions & 0 deletions tests/Models/NullTaskSeenTest.php
Original file line number Diff line number Diff line change
@@ -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\Tasks\tests\Models;

use Modules\Tasks\Models\NullTaskSeen;

/**
* @internal
*/
final class NullTaskSeenTest extends \PHPUnit\Framework\TestCase
{
/**
* @covers Modules\Tasks\Models\NullTaskSeen
* @group framework
*/
public function testNull() : void
{
self::assertInstanceOf('\Modules\Tasks\Models\TaskSeen', new NullTaskSeen());
}

/**
* @covers Modules\Tasks\Models\NullTaskSeen
* @group framework
*/
public function testId() : void
{
$null = new NullTaskSeen(2);
self::assertEquals(2, $null->getId());
}

/**
* @covers Modules\Tasks\Models\NullTaskSeen
* @group framework
*/
public function testJsonSerialize() : void
{
$null = new NullTaskSeen(2);
self::assertEquals(['id' => 2], $null);
}
}

0 comments on commit b2a009f

Please sign in to comment.