diff options
Diffstat (limited to 'tests/Core/Controller/CssControllerTest.php')
-rw-r--r-- | tests/Core/Controller/CssControllerTest.php | 36 |
1 files changed, 8 insertions, 28 deletions
diff --git a/tests/Core/Controller/CssControllerTest.php b/tests/Core/Controller/CssControllerTest.php index d2a791ec1b0..b4764d6ea3a 100644 --- a/tests/Core/Controller/CssControllerTest.php +++ b/tests/Core/Controller/CssControllerTest.php @@ -1,24 +1,8 @@ <?php + /** - * @copyright 2017, 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: 2017 Nextcloud GmbH and Nextcloud contributors + * SPDX-License-Identifier: AGPL-3.0-or-later */ namespace Tests\Core\Controller; @@ -38,7 +22,6 @@ use OCP\IRequest; use Test\TestCase; class CssControllerTest extends TestCase { - /** @var IAppData|\PHPUnit\Framework\MockObject\MockObject */ private $appData; @@ -74,7 +57,7 @@ class CssControllerTest extends TestCase { ); } - public function testNoCssFolderForApp() { + public function testNoCssFolderForApp(): void { $this->appData->method('getFolder') ->with('myapp') ->willThrowException(new NotFoundException()); @@ -85,7 +68,7 @@ class CssControllerTest extends TestCase { } - public function testNoCssFile() { + public function testNoCssFile(): void { $folder = $this->createMock(ISimpleFolder::class); $this->appData->method('getFolder') ->with('myapp') @@ -99,7 +82,7 @@ class CssControllerTest extends TestCase { $this->assertInstanceOf(NotFoundResponse::class, $result); } - public function testGetFile() { + public function testGetFile(): void { $folder = $this->createMock(ISimpleFolder::class); $file = $this->createMock(ISimpleFile::class); $file->method('getName')->willReturn('my name'); @@ -118,13 +101,12 @@ class CssControllerTest extends TestCase { $expires->setTimestamp(1337); $expires->add(new \DateInterval('PT31536000S')); $expected->addHeader('Expires', $expires->format(\DateTime::RFC1123)); - $expected->addHeader('Pragma', 'cache'); $result = $this->controller->getCss('file.css', 'myapp'); $this->assertEquals($expected, $result); } - public function testGetGzipFile() { + public function testGetGzipFile(): void { $folder = $this->createMock(ISimpleFolder::class); $gzipFile = $this->createMock(ISimpleFile::class); $gzipFile->method('getName')->willReturn('my name'); @@ -148,13 +130,12 @@ class CssControllerTest extends TestCase { $expires->setTimestamp(1337); $expires->add(new \DateInterval('PT31536000S')); $expected->addHeader('Expires', $expires->format(\DateTime::RFC1123)); - $expected->addHeader('Pragma', 'cache'); $result = $this->controller->getCss('file.css', 'myapp'); $this->assertEquals($expected, $result); } - public function testGetGzipFileNotFound() { + public function testGetGzipFileNotFound(): void { $folder = $this->createMock(ISimpleFolder::class); $file = $this->createMock(ISimpleFile::class); $file->method('getName')->willReturn('my name'); @@ -183,7 +164,6 @@ class CssControllerTest extends TestCase { $expires->setTimestamp(1337); $expires->add(new \DateInterval('PT31536000S')); $expected->addHeader('Expires', $expires->format(\DateTime::RFC1123)); - $expected->addHeader('Pragma', 'cache'); $result = $this->controller->getCss('file.css', 'myapp'); $this->assertEquals($expected, $result); |