aboutsummaryrefslogtreecommitdiffstats
path: root/tests/lib/AppFramework/Bootstrap
diff options
context:
space:
mode:
Diffstat (limited to 'tests/lib/AppFramework/Bootstrap')
-rw-r--r--tests/lib/AppFramework/Bootstrap/CoordinatorTest.php9
-rw-r--r--tests/lib/AppFramework/Bootstrap/FunctionInjectorTest.php3
2 files changed, 7 insertions, 5 deletions
diff --git a/tests/lib/AppFramework/Bootstrap/CoordinatorTest.php b/tests/lib/AppFramework/Bootstrap/CoordinatorTest.php
index 05e7a1b71c7..0eeddb2173a 100644
--- a/tests/lib/AppFramework/Bootstrap/CoordinatorTest.php
+++ b/tests/lib/AppFramework/Bootstrap/CoordinatorTest.php
@@ -11,6 +11,7 @@ namespace lib\AppFramework\Bootstrap;
use OC\AppFramework\Bootstrap\Coordinator;
use OC\Support\CrashReport\Registry;
+use OCA\Settings\AppInfo\Application;
use OCP\App\IAppManager;
use OCP\AppFramework\App;
use OCP\AppFramework\Bootstrap\IBootContext;
@@ -76,7 +77,7 @@ class CoordinatorTest extends TestCase {
$appId = 'settings';
$this->serverContainer->expects($this->once())
->method('query')
- ->with(\OCA\Settings\AppInfo\Application::class)
+ ->with(Application::class)
->willThrowException(new QueryException(''));
$this->logger->expects($this->once())
->method('error');
@@ -86,10 +87,10 @@ class CoordinatorTest extends TestCase {
public function testBootAppNotBootable(): void {
$appId = 'settings';
- $mockApp = $this->createMock(\OCA\Settings\AppInfo\Application::class);
+ $mockApp = $this->createMock(Application::class);
$this->serverContainer->expects($this->once())
->method('query')
- ->with(\OCA\Settings\AppInfo\Application::class)
+ ->with(Application::class)
->willReturn($mockApp);
$this->coordinator->bootApp($appId);
@@ -110,7 +111,7 @@ class CoordinatorTest extends TestCase {
};
$this->serverContainer->expects($this->once())
->method('query')
- ->with(\OCA\Settings\AppInfo\Application::class)
+ ->with(Application::class)
->willReturn($mockApp);
$this->coordinator->bootApp($appId);
diff --git a/tests/lib/AppFramework/Bootstrap/FunctionInjectorTest.php b/tests/lib/AppFramework/Bootstrap/FunctionInjectorTest.php
index c32331e8ba1..8f6944ce34f 100644
--- a/tests/lib/AppFramework/Bootstrap/FunctionInjectorTest.php
+++ b/tests/lib/AppFramework/Bootstrap/FunctionInjectorTest.php
@@ -11,6 +11,7 @@ namespace lib\AppFramework\Bootstrap;
use OC\AppFramework\Bootstrap\FunctionInjector;
use OC\AppFramework\Utility\SimpleContainer;
+use OCP\AppFramework\QueryException;
use Test\TestCase;
interface Foo {
@@ -27,7 +28,7 @@ class FunctionInjectorTest extends TestCase {
}
public function testInjectFnNotRegistered(): void {
- $this->expectException(\OCP\AppFramework\QueryException::class);
+ $this->expectException(QueryException::class);
(new FunctionInjector($this->container))->injectFn(static function (Foo $p1): void {
});