mirror of
https://github.com/Karaka-Management/oms-RiskManagement.git
synced 2026-02-09 08:48:40 +00:00
add unit tests
This commit is contained in:
parent
31bc2c3d9a
commit
7c8d916102
|
|
@ -39,7 +39,7 @@ final class CauseMapperTest extends \PHPUnit\Framework\TestCase
|
||||||
$obj->setProbability(1);
|
$obj->setProbability(1);
|
||||||
|
|
||||||
$department = new Department();
|
$department = new Department();
|
||||||
$department->department = new NullOrgDepartment(2);
|
$department->department = new NullOrgDepartment(1);
|
||||||
$obj->setDepartment($department);
|
$obj->setDepartment($department);
|
||||||
|
|
||||||
$category = new Category();
|
$category = new Category();
|
||||||
|
|
|
||||||
|
|
@ -44,8 +44,8 @@ final class DepartmentTest extends \PHPUnit\Framework\TestCase
|
||||||
{
|
{
|
||||||
$obj = new Department();
|
$obj = new Department();
|
||||||
|
|
||||||
$obj->department = new NullOrgDepartment(2);
|
$obj->department = new NullOrgDepartment(1);
|
||||||
self::assertEquals(2, $obj->department->getId());
|
self::assertEquals(1, $obj->department->getId());
|
||||||
|
|
||||||
$obj->setResponsible(1);
|
$obj->setResponsible(1);
|
||||||
self::assertEquals(1, $obj->getResponsible());
|
self::assertEquals(1, $obj->getResponsible());
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,7 @@ final class ProcessMapperTest extends \PHPUnit\Framework\TestCase
|
||||||
$obj = new Process();
|
$obj = new Process();
|
||||||
$obj->title = 'Name';
|
$obj->title = 'Name';
|
||||||
$obj->descriptionRaw = 'Description';
|
$obj->descriptionRaw = 'Description';
|
||||||
$obj->setDepartment(new NullDepartment(2));
|
$obj->setDepartment(new NullDepartment(1));
|
||||||
$obj->setResponsible(1);
|
$obj->setResponsible(1);
|
||||||
$obj->setDeputy(1);
|
$obj->setDeputy(1);
|
||||||
$obj->setUnit(new NullUnit(1));
|
$obj->setUnit(new NullUnit(1));
|
||||||
|
|
|
||||||
|
|
@ -44,7 +44,7 @@ final class RiskMapperTest extends \PHPUnit\Framework\TestCase
|
||||||
$obj->name = 'Risk Test';
|
$obj->name = 'Risk Test';
|
||||||
$obj->descriptionRaw = 'Description';
|
$obj->descriptionRaw = 'Description';
|
||||||
$obj->setUnit(new NullUnit(1));
|
$obj->setUnit(new NullUnit(1));
|
||||||
$obj->setDepartment(new NullDepartment(2));
|
$obj->setDepartment(new NullDepartment(1));
|
||||||
|
|
||||||
$categoryObj = new Category();
|
$categoryObj = new Category();
|
||||||
$obj->setCategory($categoryObj);
|
$obj->setCategory($categoryObj);
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" bootstrap="Bootstrap.php" colors="true" stopOnError="true" stopOnFailure="false" stopOnIncomplete="false" stopOnSkipped="false" beStrictAboutTestsThatDoNotTestAnything="false" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd">
|
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" bootstrap="Bootstrap.php" colors="true" columns="120" stopOnError="true" stopOnFailure="false" stopOnIncomplete="false" stopOnSkipped="false" beStrictAboutTestsThatDoNotTestAnything="false" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd">
|
||||||
<coverage includeUncoveredFiles="true" processUncoveredFiles="false">
|
<coverage includeUncoveredFiles="true" processUncoveredFiles="false">
|
||||||
<exclude>
|
<exclude>
|
||||||
<directory>*vendor*</directory>
|
<directory>*vendor*</directory>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user