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