mirror of
https://github.com/Karaka-Management/oms-RiskManagement.git
synced 2026-02-07 15:58:41 +00:00
fix tests
This commit is contained in:
parent
a95aaab301
commit
a8ff3439b0
|
|
@ -27,14 +27,12 @@ final class CategoryMapperTest extends \PHPUnit\Framework\TestCase
|
||||||
public function testCRUD() : void
|
public function testCRUD() : void
|
||||||
{
|
{
|
||||||
$obj = new Category();
|
$obj = new Category();
|
||||||
$obj->title = 'Name';
|
|
||||||
$obj->responsible = 1;
|
$obj->responsible = 1;
|
||||||
$obj->deputy = 1;
|
$obj->deputy = 1;
|
||||||
|
|
||||||
CategoryMapper::create()->execute($obj);
|
CategoryMapper::create()->execute($obj);
|
||||||
|
|
||||||
$objR = CategoryMapper::get()->where('id', $obj->id)->execute();
|
$objR = CategoryMapper::get()->where('id', $obj->id)->execute();
|
||||||
self::assertEquals($obj->title, $objR->title);
|
|
||||||
self::assertEquals($obj->responsible, $objR->responsible);
|
self::assertEquals($obj->responsible, $objR->responsible);
|
||||||
self::assertEquals($obj->deputy, $objR->deputy);
|
self::assertEquals($obj->deputy, $objR->deputy);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -43,6 +43,7 @@ final class RiskMapperTest extends \PHPUnit\Framework\TestCase
|
||||||
$obj->department = new NullDepartment(1);
|
$obj->department = new NullDepartment(1);
|
||||||
$obj->category = new Category();
|
$obj->category = new Category();
|
||||||
$obj->process = new Process();
|
$obj->process = new Process();
|
||||||
|
$obj->process->unit = 1;
|
||||||
|
|
||||||
$obj->responsible = new NullAccount(1);
|
$obj->responsible = new NullAccount(1);
|
||||||
$obj->deputy = new NullAccount(1);
|
$obj->deputy = new NullAccount(1);
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,7 @@ final class SolutionTest extends \PHPUnit\Framework\TestCase
|
||||||
self::assertEquals('', $obj->description);
|
self::assertEquals('', $obj->description);
|
||||||
self::assertEquals('', $obj->descriptionRaw);
|
self::assertEquals('', $obj->descriptionRaw);
|
||||||
self::assertEquals(0, $obj->probability);
|
self::assertEquals(0, $obj->probability);
|
||||||
self::assertEquals(0, $obj->cause);
|
self::assertEquals(null, $obj->cause);
|
||||||
self::assertEquals(0, $obj->risk);
|
self::assertEquals(0, $obj->risk->id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user