mirror of
https://github.com/Karaka-Management/oms-RiskManagement.git
synced 2026-01-11 11:28:41 +00:00
autofixes
This commit is contained in:
parent
ec4f5cabeb
commit
1041f66c81
|
|
@ -14,8 +14,6 @@ declare(strict_types=1);
|
|||
|
||||
namespace Modules\RiskManagement\Models;
|
||||
|
||||
use Modules\Admin\Models\Account;
|
||||
|
||||
/**
|
||||
* Risk Management class.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -14,7 +14,6 @@ declare(strict_types=1);
|
|||
|
||||
namespace Modules\RiskManagement\tests\Models;
|
||||
|
||||
use Modules\Admin\Models\NullAccount;
|
||||
use Modules\RiskManagement\Models\Category;
|
||||
use Modules\RiskManagement\Models\CategoryMapper;
|
||||
|
||||
|
|
@ -29,11 +28,11 @@ class CategoryMapperTest extends \PHPUnit\Framework\TestCase
|
|||
*/
|
||||
public function testCRUD() : void
|
||||
{
|
||||
$obj = new Category();
|
||||
$obj->title = 'Name';
|
||||
$obj = new Category();
|
||||
$obj->title = 'Name';
|
||||
$obj->descriptionRaw = 'Description';
|
||||
$obj->responsible = 1;
|
||||
$obj->deputy = 1;
|
||||
$obj->responsible = 1;
|
||||
$obj->deputy = 1;
|
||||
|
||||
CategoryMapper::create($obj);
|
||||
|
||||
|
|
|
|||
|
|
@ -31,8 +31,8 @@ class CauseMapperTest extends \PHPUnit\Framework\TestCase
|
|||
*/
|
||||
public function testCRUD() : void
|
||||
{
|
||||
$obj = new Cause();
|
||||
$obj->title = 'Cause Test';
|
||||
$obj = new Cause();
|
||||
$obj->title = 'Cause Test';
|
||||
$obj->descriptionRaw = 'Description';
|
||||
$obj->setProbability(1);
|
||||
|
||||
|
|
@ -40,11 +40,11 @@ class CauseMapperTest extends \PHPUnit\Framework\TestCase
|
|||
$department->setDepartment(2);
|
||||
$obj->setDepartment($department);
|
||||
|
||||
$category = new Category();
|
||||
$category = new Category();
|
||||
$category->title = 'Test Cat';
|
||||
$obj->setCategory($category);
|
||||
|
||||
$risk = new Risk();
|
||||
$risk = new Risk();
|
||||
$risk->name = 'Cause Test Risk';
|
||||
$risk->setUnit(1);
|
||||
$obj->setRisk($risk);
|
||||
|
|
|
|||
|
|
@ -28,8 +28,8 @@ class ProcessMapperTest extends \PHPUnit\Framework\TestCase
|
|||
*/
|
||||
public function testCRUD() : void
|
||||
{
|
||||
$obj = new Process();
|
||||
$obj->title = 'Name';
|
||||
$obj = new Process();
|
||||
$obj->title = 'Name';
|
||||
$obj->descriptionRaw = 'Description';
|
||||
$obj->setDepartment(2);
|
||||
$obj->setResponsible(1);
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ class RiskMapperTest extends \PHPUnit\Framework\TestCase
|
|||
{
|
||||
$obj = new Risk();
|
||||
|
||||
$obj->name = 'Risk Test';
|
||||
$obj->name = 'Risk Test';
|
||||
$obj->descriptionRaw = 'Description';
|
||||
$obj->setUnit(1);
|
||||
$obj->setDepartment(2);
|
||||
|
|
@ -56,27 +56,27 @@ class RiskMapperTest extends \PHPUnit\Framework\TestCase
|
|||
$obj->setResponsible(1);
|
||||
$obj->setDeputy(1);
|
||||
|
||||
$causeObj = new Cause();
|
||||
$causeObj = new Cause();
|
||||
$causeObj->title = 'Risk Test Cause';
|
||||
$obj->addCause($causeObj);
|
||||
|
||||
$solutionObj = new Solution();
|
||||
$solutionObj = new Solution();
|
||||
$solutionObj->title = 'Risk Test Solution';
|
||||
$obj->addSolution($solutionObj);
|
||||
|
||||
$riskObj = new RiskObject();
|
||||
$riskObj = new RiskObject();
|
||||
$riskObj->title = 'Risk Test Object';
|
||||
$obj->addRiskObject($riskObj);
|
||||
|
||||
$obj->addHistory(2);
|
||||
|
||||
$media = new Media();
|
||||
$media->createdBy = new NullAccount(1);
|
||||
$media = new Media();
|
||||
$media->createdBy = new NullAccount(1);
|
||||
$media->description = 'desc';
|
||||
$media->setPath('some/path');
|
||||
$media->size = 11;
|
||||
$media->size = 11;
|
||||
$media->extension = 'png';
|
||||
$media->name = 'Image';
|
||||
$media->name = 'Image';
|
||||
$obj->addMedia($media);
|
||||
|
||||
RiskMapper::create($obj);
|
||||
|
|
|
|||
|
|
@ -28,8 +28,8 @@ class RiskObjectMapperTest extends \PHPUnit\Framework\TestCase
|
|||
*/
|
||||
public function testCRUD() : void
|
||||
{
|
||||
$obj = new RiskObject();
|
||||
$obj->title = 'Name';
|
||||
$obj = new RiskObject();
|
||||
$obj->title = 'Name';
|
||||
$obj->descriptionRaw = 'Description';
|
||||
$obj->setRisk(1);
|
||||
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ class SolutionMapperTest extends \PHPUnit\Framework\TestCase
|
|||
{
|
||||
$obj = new Solution();
|
||||
|
||||
$obj->title = 'Title';
|
||||
$obj->title = 'Title';
|
||||
$obj->descriptionRaw = 'Description';
|
||||
$obj->setProbability(1);
|
||||
$obj->setCause(1);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user