Remove IE8 support in CertificateController
* Also fix getMock warnings in tests
This commit is contained in:
parent
0cb8f74cd1
commit
fd95985a21
2 changed files with 6 additions and 10 deletions
|
@ -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);
|
||||
|
|
|
@ -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')
|
||||
|
|
Loading…
Reference in a new issue