aboutsummaryrefslogtreecommitdiffstats
path: root/tests/Core/Controller/WellKnownControllerTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/Core/Controller/WellKnownControllerTest.php')
-rw-r--r--tests/Core/Controller/WellKnownControllerTest.php28
1 files changed, 6 insertions, 22 deletions
diff --git a/tests/Core/Controller/WellKnownControllerTest.php b/tests/Core/Controller/WellKnownControllerTest.php
index 08af2a214ae..35606dc6384 100644
--- a/tests/Core/Controller/WellKnownControllerTest.php
+++ b/tests/Core/Controller/WellKnownControllerTest.php
@@ -2,25 +2,9 @@
declare(strict_types=1);
-/*
- * @copyright 2020 Christoph Wurst <christoph@winzerhof-wurst.at>
- *
- * @author 2020 Christoph Wurst <christoph@winzerhof-wurst.at>
- *
- * @license GNU AGPL version 3 or any later version
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
+/**
+ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-License-Identifier: AGPL-3.0-or-later
*/
namespace Tests\Core\Controller;
@@ -56,7 +40,7 @@ class WellKnownControllerTest extends TestCase {
}
public function testHandleNotProcessed(): void {
- $httpResponse = $this->controller->handle("nodeinfo");
+ $httpResponse = $this->controller->handle('nodeinfo');
self::assertInstanceOf(JSONResponse::class, $httpResponse);
self::assertArrayHasKey('X-NEXTCLOUD-WELL-KNOWN', $httpResponse->getHeaders());
@@ -71,14 +55,14 @@ class WellKnownControllerTest extends TestCase {
$this->manager->expects(self::once())
->method('process')
->with(
- "nodeinfo",
+ 'nodeinfo',
$this->request
)->willReturn($response);
$jsonResponse->expects(self::once())
->method('addHeader')
->willReturnSelf();
- $httpResponse = $this->controller->handle("nodeinfo");
+ $httpResponse = $this->controller->handle('nodeinfo');
self::assertInstanceOf(JSONResponse::class, $httpResponse);
}
or: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
<?php
/**
 * @author Björn Schießle <schiessle@owncloud.com>
 * @author Thomas Müller <thomas.mueller@tmit.eu>
 *
 * @copyright Copyright (c) 2016, ownCloud, Inc.
 * @license AGPL-3.0
 *
 * This code is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License, version 3,
 * as published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License, version 3,
 * along with this program.  If not, see <http://www.gnu.org/licenses/>
 *
 */

namespace OC\Encryption\Exceptions;

use OCP\Encryption\Exceptions\GenericEncryptionException;

class ModuleAlreadyExistsException extends GenericEncryptionException {

	/**
	 * @param string $id
	 * @param string $name
	 */
	public function __construct($id, $name) {
		parent::__construct('Id "' . $id . '" already used by encryption module "' . $name . '"');
	}

}