getUserManager()->createUser('dummy', '456'); \OC::$server->getUserSession()->setUser(\OC::$server->getUserManager()->get('dummy')); } protected function tearDown(): void { \OC::$server->getUserManager()->get('dummy')->delete(); parent::tearDown(); } public function test(): void { $app = new Application(); $c = $app->getContainer(); $services = [ 'OCA\Comments\Controller\NotificationsController', 'OCA\Comments\Activity\Filter', 'OCA\Comments\Activity\Listener', 'OCA\Comments\Activity\Provider', 'OCA\Comments\Activity\Setting', 'OCA\Comments\Notification\Listener', Notifier::class, ]; foreach ($services as $service) { $s = $c->get($service); $this->assertInstanceOf($service, $s); } } }