mirror of
https://github.com/Karaka-Management/oms-Kanban.git
synced 2026-01-11 11:28:42 +00:00
fix tests
This commit is contained in:
parent
34e69fceb1
commit
02927df9a6
|
|
@ -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');
|
||||
|
|
|
|||
|
|
@ -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());
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user