diff options
Diffstat (limited to 'tests/lib/AppFramework/Http/EmptyFeaturePolicyTest.php')
-rw-r--r-- | tests/lib/AppFramework/Http/EmptyFeaturePolicyTest.php | 47 |
1 files changed, 15 insertions, 32 deletions
diff --git a/tests/lib/AppFramework/Http/EmptyFeaturePolicyTest.php b/tests/lib/AppFramework/Http/EmptyFeaturePolicyTest.php index 6ced435286c..71342485552 100644 --- a/tests/lib/AppFramework/Http/EmptyFeaturePolicyTest.php +++ b/tests/lib/AppFramework/Http/EmptyFeaturePolicyTest.php @@ -2,25 +2,8 @@ declare(strict_types=1); /** - * @copyright Copyright (c) 2019, Roeland Jago Douma <roeland@famdouma.nl> - * - * @author Roeland Jago Douma <roeland@famdouma.nl> - * - * @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: 2019 Nextcloud GmbH and Nextcloud contributors + * SPDX-License-Identifier: AGPL-3.0-or-later */ namespace Test\AppFramework\Http; @@ -36,19 +19,19 @@ class EmptyFeaturePolicyTest extends \Test\TestCase { $this->policy = new EmptyFeaturePolicy(); } - public function testGetPolicyDefault() { + public function testGetPolicyDefault(): void { $defaultPolicy = "autoplay 'none';camera 'none';fullscreen 'none';geolocation 'none';microphone 'none';payment 'none'"; $this->assertSame($defaultPolicy, $this->policy->buildPolicy()); } - public function testGetPolicyAutoplayDomainValid() { + public function testGetPolicyAutoplayDomainValid(): void { $expectedPolicy = "autoplay www.nextcloud.com;camera 'none';fullscreen 'none';geolocation 'none';microphone 'none';payment 'none'"; $this->policy->addAllowedAutoplayDomain('www.nextcloud.com'); $this->assertSame($expectedPolicy, $this->policy->buildPolicy()); } - public function testGetPolicyAutoplayDomainValidMultiple() { + public function testGetPolicyAutoplayDomainValidMultiple(): void { $expectedPolicy = "autoplay www.nextcloud.com www.nextcloud.org;camera 'none';fullscreen 'none';geolocation 'none';microphone 'none';payment 'none'"; $this->policy->addAllowedAutoplayDomain('www.nextcloud.com'); @@ -56,14 +39,14 @@ class EmptyFeaturePolicyTest extends \Test\TestCase { $this->assertSame($expectedPolicy, $this->policy->buildPolicy()); } - public function testGetPolicyCameraDomainValid() { + public function testGetPolicyCameraDomainValid(): void { $expectedPolicy = "autoplay 'none';camera www.nextcloud.com;fullscreen 'none';geolocation 'none';microphone 'none';payment 'none'"; $this->policy->addAllowedCameraDomain('www.nextcloud.com'); $this->assertSame($expectedPolicy, $this->policy->buildPolicy()); } - public function testGetPolicyCameraDomainValidMultiple() { + public function testGetPolicyCameraDomainValidMultiple(): void { $expectedPolicy = "autoplay 'none';camera www.nextcloud.com www.nextcloud.org;fullscreen 'none';geolocation 'none';microphone 'none';payment 'none'"; $this->policy->addAllowedCameraDomain('www.nextcloud.com'); @@ -71,14 +54,14 @@ class EmptyFeaturePolicyTest extends \Test\TestCase { $this->assertSame($expectedPolicy, $this->policy->buildPolicy()); } - public function testGetPolicyFullScreenDomainValid() { + public function testGetPolicyFullScreenDomainValid(): void { $expectedPolicy = "autoplay 'none';camera 'none';fullscreen www.nextcloud.com;geolocation 'none';microphone 'none';payment 'none'"; $this->policy->addAllowedFullScreenDomain('www.nextcloud.com'); $this->assertSame($expectedPolicy, $this->policy->buildPolicy()); } - public function testGetPolicyFullScreenDomainValidMultiple() { + public function testGetPolicyFullScreenDomainValidMultiple(): void { $expectedPolicy = "autoplay 'none';camera 'none';fullscreen www.nextcloud.com www.nextcloud.org;geolocation 'none';microphone 'none';payment 'none'"; $this->policy->addAllowedFullScreenDomain('www.nextcloud.com'); @@ -86,14 +69,14 @@ class EmptyFeaturePolicyTest extends \Test\TestCase { $this->assertSame($expectedPolicy, $this->policy->buildPolicy()); } - public function testGetPolicyGeoLocationDomainValid() { + public function testGetPolicyGeoLocationDomainValid(): void { $expectedPolicy = "autoplay 'none';camera 'none';fullscreen 'none';geolocation www.nextcloud.com;microphone 'none';payment 'none'"; $this->policy->addAllowedGeoLocationDomain('www.nextcloud.com'); $this->assertSame($expectedPolicy, $this->policy->buildPolicy()); } - public function testGetPolicyGeoLocationDomainValidMultiple() { + public function testGetPolicyGeoLocationDomainValidMultiple(): void { $expectedPolicy = "autoplay 'none';camera 'none';fullscreen 'none';geolocation www.nextcloud.com www.nextcloud.org;microphone 'none';payment 'none'"; $this->policy->addAllowedGeoLocationDomain('www.nextcloud.com'); @@ -101,14 +84,14 @@ class EmptyFeaturePolicyTest extends \Test\TestCase { $this->assertSame($expectedPolicy, $this->policy->buildPolicy()); } - public function testGetPolicyMicrophoneDomainValid() { + public function testGetPolicyMicrophoneDomainValid(): void { $expectedPolicy = "autoplay 'none';camera 'none';fullscreen 'none';geolocation 'none';microphone www.nextcloud.com;payment 'none'"; $this->policy->addAllowedMicrophoneDomain('www.nextcloud.com'); $this->assertSame($expectedPolicy, $this->policy->buildPolicy()); } - public function testGetPolicyMicrophoneDomainValidMultiple() { + public function testGetPolicyMicrophoneDomainValidMultiple(): void { $expectedPolicy = "autoplay 'none';camera 'none';fullscreen 'none';geolocation 'none';microphone www.nextcloud.com www.nextcloud.org;payment 'none'"; $this->policy->addAllowedMicrophoneDomain('www.nextcloud.com'); @@ -116,14 +99,14 @@ class EmptyFeaturePolicyTest extends \Test\TestCase { $this->assertSame($expectedPolicy, $this->policy->buildPolicy()); } - public function testGetPolicyPaymentDomainValid() { + public function testGetPolicyPaymentDomainValid(): void { $expectedPolicy = "autoplay 'none';camera 'none';fullscreen 'none';geolocation 'none';microphone 'none';payment www.nextcloud.com"; $this->policy->addAllowedPaymentDomain('www.nextcloud.com'); $this->assertSame($expectedPolicy, $this->policy->buildPolicy()); } - public function testGetPolicyPaymentDomainValidMultiple() { + public function testGetPolicyPaymentDomainValidMultiple(): void { $expectedPolicy = "autoplay 'none';camera 'none';fullscreen 'none';geolocation 'none';microphone 'none';payment www.nextcloud.com www.nextcloud.org"; $this->policy->addAllowedPaymentDomain('www.nextcloud.com'); |