Add test cases for null models

This commit is contained in:
Dennis Eichhorn 2023-10-16 23:39:38 +00:00
parent 403af87f4b
commit 0973c9f287
4 changed files with 48 additions and 8 deletions

View File

@ -23,7 +23,7 @@ final class NullEmployeeEducationHistoryTest extends \PHPUnit\Framework\TestCase
{
/**
* @covers Modules\HumanResourceManagement\Models\NullEmployeeEducationHistory
* @group framework
* @group module
*/
public function testNull() : void
{
@ -32,11 +32,21 @@ final class NullEmployeeEducationHistoryTest extends \PHPUnit\Framework\TestCase
/**
* @covers Modules\HumanResourceManagement\Models\NullEmployeeEducationHistory
* @group framework
* @group module
*/
public function testId() : void
{
$null = new NullEmployeeEducationHistory(2);
self::assertEquals(2, $null->id);
}
/**
* @covers Modules\HumanResourceManagement\Models\NullEmployeeEducationHistory
* @group module
*/
public function testJsonSerialize() : void
{
$null = new NullEmployeeEducationHistory(2);
self::assertEquals(['id' => 2], $null);
}
}

View File

@ -23,7 +23,7 @@ final class NullEmployeeHistoryTest extends \PHPUnit\Framework\TestCase
{
/**
* @covers Modules\HumanResourceManagement\Models\NullEmployeeHistory
* @group framework
* @group module
*/
public function testNull() : void
{
@ -32,11 +32,21 @@ final class NullEmployeeHistoryTest extends \PHPUnit\Framework\TestCase
/**
* @covers Modules\HumanResourceManagement\Models\NullEmployeeHistory
* @group framework
* @group module
*/
public function testId() : void
{
$null = new NullEmployeeHistory(2);
self::assertEquals(2, $null->id);
}
/**
* @covers Modules\HumanResourceManagement\Models\NullEmployeeHistory
* @group module
*/
public function testJsonSerialize() : void
{
$null = new NullEmployeeHistory(2);
self::assertEquals(['id' => 2], $null);
}
}

View File

@ -23,7 +23,7 @@ final class NullEmployeeTest extends \PHPUnit\Framework\TestCase
{
/**
* @covers Modules\HumanResourceManagement\Models\NullEmployee
* @group framework
* @group module
*/
public function testNull() : void
{
@ -32,11 +32,21 @@ final class NullEmployeeTest extends \PHPUnit\Framework\TestCase
/**
* @covers Modules\HumanResourceManagement\Models\NullEmployee
* @group framework
* @group module
*/
public function testId() : void
{
$null = new NullEmployee(2);
self::assertEquals(2, $null->id);
}
/**
* @covers Modules\HumanResourceManagement\Models\NullEmployee
* @group module
*/
public function testJsonSerialize() : void
{
$null = new NullEmployee(2);
self::assertEquals(['id' => 2], $null);
}
}

View File

@ -23,7 +23,7 @@ final class NullEmployeeWorkHistoryTest extends \PHPUnit\Framework\TestCase
{
/**
* @covers Modules\HumanResourceManagement\Models\NullEmployeeWorkHistory
* @group framework
* @group module
*/
public function testNull() : void
{
@ -32,11 +32,21 @@ final class NullEmployeeWorkHistoryTest extends \PHPUnit\Framework\TestCase
/**
* @covers Modules\HumanResourceManagement\Models\NullEmployeeWorkHistory
* @group framework
* @group module
*/
public function testId() : void
{
$null = new NullEmployeeWorkHistory(2);
self::assertEquals(2, $null->id);
}
/**
* @covers Modules\HumanResourceManagement\Models\NullEmployeeWorkHistory
* @group module
*/
public function testJsonSerialize() : void
{
$null = new NullEmployeeWorkHistory(2);
self::assertEquals(['id' => 2], $null);
}
}