]> source.dussan.org Git - nextcloud-server.git/commitdiff
Remove old unit tests as well 21224/head
authorJoas Schilling <coding@schilljs.com>
Fri, 5 Jun 2020 13:10:20 +0000 (15:10 +0200)
committerRoeland Jago Douma <roeland@famdouma.nl>
Sat, 6 Jun 2020 09:11:11 +0000 (11:11 +0200)
Signed-off-by: Joas Schilling <coding@schilljs.com>
apps/settings/tests/AppInfo/ApplicationTest.php

index 794adc25d7f92d8c0124f3ae2239589b1b004edf..66994872a3ddd2187c9dcabd172b984bd9850146 100644 (file)
 
 namespace OCA\Settings\Tests\AppInfo;
 
-use OC\User\Session;
 use OCA\Settings\AppInfo\Application;
 use OCA\Settings\Controller\AdminSettingsController;
 use OCA\Settings\Controller\AppSettingsController;
 use OCA\Settings\Controller\AuthSettingsController;
-use OCA\Settings\Controller\CertificateController;
 use OCA\Settings\Controller\CheckSetupController;
 use OCA\Settings\Controller\LogSettingsController;
 use OCA\Settings\Controller\MailSettingsController;
@@ -39,8 +37,6 @@ use OCA\Settings\Middleware\SubadminMiddleware;
 use OCP\AppFramework\Controller;
 use OCP\AppFramework\IAppContainer;
 use OCP\AppFramework\Middleware;
-use OCP\IUser;
-use OCP\IUserSession;
 use Test\TestCase;
 
 /**
@@ -72,7 +68,6 @@ class ApplicationTest extends TestCase {
                        [AdminSettingsController::class, Controller::class],
                        [AppSettingsController::class, Controller::class],
                        [AuthSettingsController::class, Controller::class],
-                       // Needs session: [CertificateController::class, Controller::class],
                        [CheckSetupController::class, Controller::class],
                        [LogSettingsController::class, Controller::class],
                        [MailSettingsController::class, Controller::class],
@@ -90,31 +85,4 @@ class ApplicationTest extends TestCase {
        public function testContainerQuery($service, $expected) {
                $this->assertTrue($this->container->query($service) instanceof $expected);
        }
-
-       public function dataContainerQueryRequiresSession() {
-               return [
-                       [CertificateController::class, Controller::class],
-               ];
-       }
-
-       /**
-        * @dataProvider dataContainerQueryRequiresSession
-        * @param string $service
-        * @param string $expected
-        */
-       public function testContainerQueryRequiresSession($service, $expected) {
-               $user = $this->createMock(IUser::class);
-               $user->expects($this->once())
-                       ->method('getUID')
-                       ->willReturn('test');
-
-               $session = $this->createMock(IUserSession::class);
-               $session->expects($this->once())
-                       ->method('getUser')
-                       ->willReturn($user);
-
-               $this->overwriteService(Session::class, $session);
-               $this->assertTrue($this->container->query($service) instanceof $expected);
-               $this->restoreService(Session::class);
-       }
 }