summaryrefslogtreecommitdiffstats
path: root/apps/workflowengine/tests/ManagerTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/workflowengine/tests/ManagerTest.php')
-rw-r--r--apps/workflowengine/tests/ManagerTest.php12
1 files changed, 4 insertions, 8 deletions
diff --git a/apps/workflowengine/tests/ManagerTest.php b/apps/workflowengine/tests/ManagerTest.php
index 543b4550ca6..dee6b508454 100644
--- a/apps/workflowengine/tests/ManagerTest.php
+++ b/apps/workflowengine/tests/ManagerTest.php
@@ -45,6 +45,7 @@ use OCP\IURLGenerator;
use OCP\IUserManager;
use OCP\IUserSession;
use OCP\SystemTag\ISystemTagManager;
+use OCP\WorkflowEngine\Events\RegisterEntitiesEvent;
use OCP\WorkflowEngine\ICheck;
use OCP\WorkflowEngine\IEntity;
use OCP\WorkflowEngine\IEntityEvent;
@@ -67,8 +68,6 @@ class ManagerTest extends TestCase {
protected $db;
/** @var \PHPUnit\Framework\MockObject\MockObject|ILogger */
protected $logger;
- /** @var \PHPUnit\Framework\MockObject\MockObject|EventDispatcherInterface */
- protected $legacyDispatcher;
/** @var MockObject|IServerContainer */
protected $container;
/** @var MockObject|IUserSession */
@@ -94,7 +93,6 @@ class ManagerTest extends TestCase {
return vsprintf($text, $parameters);
});
- $this->legacyDispatcher = $this->createMock(EventDispatcherInterface::class);
$this->logger = $this->createMock(ILogger::class);
$this->session = $this->createMock(IUserSession::class);
$this->dispatcher = $this->createMock(IEventDispatcher::class);
@@ -105,7 +103,6 @@ class ManagerTest extends TestCase {
\OC::$server->getDatabaseConnection(),
$this->container,
$this->l,
- $this->legacyDispatcher,
$this->logger,
$this->session,
$this->dispatcher,
@@ -532,10 +529,9 @@ class ManagerTest extends TestCase {
/** @var MockObject|IEntity $extraEntity */
$extraEntity = $this->createMock(IEntity::class);
- $this->legacyDispatcher->expects($this->once())
- ->method('dispatch')
- ->with('OCP\WorkflowEngine::registerEntities', $this->anything())
- ->willReturnCallback(function () use ($extraEntity) {
+ $this->dispatcher->expects($this->once())
+ ->method('dispatchTyped')
+ ->willReturnCallback(function (RegisterEntitiesEvent $e) use ($extraEntity) {
$this->manager->registerEntity($extraEntity);
});