add unit tests

This commit is contained in:
Dennis Eichhorn 2021-11-02 21:57:09 +01:00
parent 31bc2c3d9a
commit 7c8d916102
5 changed files with 6 additions and 6 deletions

View File

@ -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();

View File

@ -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());

View File

@ -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));

View File

@ -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);

View File

@ -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>