Skip to content

Commit 5c68c81

Browse files
committed
fix(test): restore workflow boot in log operation test
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
1 parent 1704609 commit 5c68c81

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

tests/php/ControllerIntegration/Workflow/LogProfileFieldChangeOperationTest.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
use OCA\ProfileFields\Workflow\ProfileFieldValueSubjectContext;
2525
use OCA\ProfileFields\Workflow\UserProfileFieldCheck;
2626
use OCP\App\IAppManager;
27+
use OCP\AppFramework\Bootstrap\IBootContext;
2728
use OCP\AppFramework\Services\IAppConfig;
2829
use OCP\DB\ISchemaWrapper;
2930
use OCP\EventDispatcher\Event;
@@ -199,6 +200,16 @@ protected function setUp(): void {
199200
ProfileFieldValueEntity::class,
200201
[\OCA\ProfileFields\Workflow\Event\ProfileFieldValueUpdatedEvent::class],
201202
);
203+
204+
$workflowAppClass = 'OCA\\WorkflowEngine\\AppInfo\\Application';
205+
$workflowApp = new $workflowAppClass();
206+
$bootContext = $this->createMock(IBootContext::class);
207+
$bootContext->expects($this->any())
208+
->method('injectFn')
209+
->willReturnCallback(function (callable $fn) use ($container, $generalLogger): mixed {
210+
return $fn($this->dispatcher, $container, $generalLogger);
211+
});
212+
$workflowApp->boot($bootContext);
202213
}
203214

204215
protected function tearDown(): void {

0 commit comments

Comments
 (0)