aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--settings/Controller/CertificateController.php4
-rw-r--r--tests/Settings/Controller/CertificateControllerTest.php12
2 files changed, 6 insertions, 10 deletions
diff --git a/settings/Controller/CertificateController.php b/settings/Controller/CertificateController.php
index 4a527036a7f..8121bec2ce1 100644
--- a/settings/Controller/CertificateController.php
+++ b/settings/Controller/CertificateController.php
@@ -86,10 +86,6 @@ class CertificateController extends Controller {
*/
private function addCertificate(ICertificateManager $certificateManager) {
$headers = [];
- if ($this->request->isUserAgent([\OC\AppFramework\Http\Request::USER_AGENT_IE_8])) {
- // due to upload iframe workaround, need to set content-type to text/plain
- $headers['Content-Type'] = 'text/plain';
- }
if ($this->isCertificateImportAllowed() === false) {
return new DataResponse(['message' => 'Individual certificate management disabled'], Http::STATUS_FORBIDDEN, $headers);
diff --git a/tests/Settings/Controller/CertificateControllerTest.php b/tests/Settings/Controller/CertificateControllerTest.php
index c9ea2a4024f..36b5715e734 100644
--- a/tests/Settings/Controller/CertificateControllerTest.php
+++ b/tests/Settings/Controller/CertificateControllerTest.php
@@ -51,11 +51,11 @@ class CertificateControllerTest extends \Test\TestCase {
public function setUp() {
parent::setUp();
- $this->request = $this->getMock('\OCP\IRequest');
- $this->certificateManager = $this->getMock('\OCP\ICertificateManager');
- $this->systemCertificateManager = $this->getMock('\OCP\ICertificateManager');
- $this->l10n = $this->getMock('\OCP\IL10N');
- $this->appManager = $this->getMock('OCP\App\IAppManager');
+ $this->request = $this->getMockBuilder('\OCP\IRequest')->getMock();
+ $this->certificateManager = $this->getMockBuilder('\OCP\ICertificateManager')->getMock();
+ $this->systemCertificateManager = $this->getMockBuilder('\OCP\ICertificateManager')->getMock();
+ $this->l10n = $this->getMockBuilder('\OCP\IL10N')->getMock();
+ $this->appManager = $this->getMockBuilder('OCP\App\IAppManager')->getMock();
$this->certificateController = $this->getMockBuilder('OC\Settings\Controller\CertificateController')
->setConstructorArgs(
@@ -90,7 +90,7 @@ class CertificateControllerTest extends \Test\TestCase {
'name' => 'goodCertificate.crt',
];
- $certificate = $this->getMock('\OCP\ICertificate');
+ $certificate = $this->getMockBuilder('\OCP\ICertificate')->getMock();
$certificate
->expects($this->once())
->method('getName')