fix tests

This commit is contained in:
Dennis Eichhorn 2020-11-28 19:26:40 +01:00
parent 34e69fceb1
commit 02927df9a6
2 changed files with 4 additions and 3 deletions

View File

@ -49,7 +49,7 @@ class ControllerTest extends \PHPUnit\Framework\TestCase
$this->app->orgId = 1;
$this->app->accountManager = new AccountManager($GLOBALS['session']);
$this->app->appSettings = new CoreSettings($this->app->dbPool->get());
$this->app->moduleManager = new ModuleManager($this->app, __DIR__ . '/../../../Modules');
$this->app->moduleManager = new ModuleManager($this->app, __DIR__ . '/../../../Modules/');
$this->app->dispatcher = new Dispatcher($this->app);
$this->app->eventManager = new EventManager($this->app->dispatcher);
$this->app->eventManager->importFromFile(__DIR__ . '/../../../Web/Api/Hooks.php');

View File

@ -18,6 +18,7 @@ use Modules\Admin\Models\NullAccount;
use Modules\Kanban\Models\CardStatus;
use Modules\Kanban\Models\CardType;
use Modules\Kanban\Models\KanbanCard;
use Modules\Media\Models\NullMedia;
/**
* @internal
@ -61,7 +62,7 @@ class KanbanCardTest extends \PHPUnit\Framework\TestCase
$card->setOrder(2);
$card->createdBy = new NullAccount(1);
$card->addComment(5);
$card->addMedia(7);
$card->addMedia($m = new NullMedia(7));
self::assertEquals(CardStatus::ARCHIVED, $card->getStatus());
self::assertEquals(CardType::TASK, $card->getType());
@ -71,6 +72,6 @@ class KanbanCardTest extends \PHPUnit\Framework\TestCase
self::assertEquals(2, $card->getOrder());
self::assertEquals(1, $card->createdBy->getId());
self::assertEquals([5], $card->getComments());
self::assertEquals([7], $card->getMedia());
self::assertEquals([$m], $card->getMedia());
}
}