From a8ff3439b0240a5114040a6c9c0cb42739ea1d36 Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Thu, 25 Apr 2024 20:51:47 +0000 Subject: [PATCH] fix tests --- tests/Models/CategoryMapperTest.php | 2 -- tests/Models/RiskMapperTest.php | 1 + tests/Models/SolutionTest.php | 4 ++-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/tests/Models/CategoryMapperTest.php b/tests/Models/CategoryMapperTest.php index 39caf35..8451a3b 100755 --- a/tests/Models/CategoryMapperTest.php +++ b/tests/Models/CategoryMapperTest.php @@ -27,14 +27,12 @@ final class CategoryMapperTest extends \PHPUnit\Framework\TestCase public function testCRUD() : void { $obj = new Category(); - $obj->title = 'Name'; $obj->responsible = 1; $obj->deputy = 1; CategoryMapper::create()->execute($obj); $objR = CategoryMapper::get()->where('id', $obj->id)->execute(); - self::assertEquals($obj->title, $objR->title); self::assertEquals($obj->responsible, $objR->responsible); self::assertEquals($obj->deputy, $objR->deputy); } diff --git a/tests/Models/RiskMapperTest.php b/tests/Models/RiskMapperTest.php index aa0de3a..87f7e1a 100755 --- a/tests/Models/RiskMapperTest.php +++ b/tests/Models/RiskMapperTest.php @@ -43,6 +43,7 @@ final class RiskMapperTest extends \PHPUnit\Framework\TestCase $obj->department = new NullDepartment(1); $obj->category = new Category(); $obj->process = new Process(); + $obj->process->unit = 1; $obj->responsible = new NullAccount(1); $obj->deputy = new NullAccount(1); diff --git a/tests/Models/SolutionTest.php b/tests/Models/SolutionTest.php index f5d37db..32278da 100755 --- a/tests/Models/SolutionTest.php +++ b/tests/Models/SolutionTest.php @@ -32,7 +32,7 @@ final class SolutionTest extends \PHPUnit\Framework\TestCase self::assertEquals('', $obj->description); self::assertEquals('', $obj->descriptionRaw); self::assertEquals(0, $obj->probability); - self::assertEquals(0, $obj->cause); - self::assertEquals(0, $obj->risk); + self::assertEquals(null, $obj->cause); + self::assertEquals(0, $obj->risk->id); } }