mirror of
https://github.com/Karaka-Management/oms-RiskManagement.git
synced 2026-01-17 14:18:41 +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);
|
||||
|
||||
$department = new Department();
|
||||
$department->department = new NullOrgDepartment(2);
|
||||
$department->department = new NullOrgDepartment(1);
|
||||
$obj->setDepartment($department);
|
||||
|
||||
$category = new Category();
|
||||
|
|
|
|||
|
|
@ -44,8 +44,8 @@ final class DepartmentTest extends \PHPUnit\Framework\TestCase
|
|||
{
|
||||
$obj = new Department();
|
||||
|
||||
$obj->department = new NullOrgDepartment(2);
|
||||
self::assertEquals(2, $obj->department->getId());
|
||||
$obj->department = new NullOrgDepartment(1);
|
||||
self::assertEquals(1, $obj->department->getId());
|
||||
|
||||
$obj->setResponsible(1);
|
||||
self::assertEquals(1, $obj->getResponsible());
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ final class ProcessMapperTest extends \PHPUnit\Framework\TestCase
|
|||
$obj = new Process();
|
||||
$obj->title = 'Name';
|
||||
$obj->descriptionRaw = 'Description';
|
||||
$obj->setDepartment(new NullDepartment(2));
|
||||
$obj->setDepartment(new NullDepartment(1));
|
||||
$obj->setResponsible(1);
|
||||
$obj->setDeputy(1);
|
||||
$obj->setUnit(new NullUnit(1));
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ final class RiskMapperTest extends \PHPUnit\Framework\TestCase
|
|||
$obj->name = 'Risk Test';
|
||||
$obj->descriptionRaw = 'Description';
|
||||
$obj->setUnit(new NullUnit(1));
|
||||
$obj->setDepartment(new NullDepartment(2));
|
||||
$obj->setDepartment(new NullDepartment(1));
|
||||
|
||||
$categoryObj = new Category();
|
||||
$obj->setCategory($categoryObj);
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<?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">
|
||||
<exclude>
|
||||
<directory>*vendor*</directory>
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user