diff options
Diffstat (limited to 'tests/lib/Files/SimpleFS/SimpleFileTest.php')
-rw-r--r-- | tests/lib/Files/SimpleFS/SimpleFileTest.php | 44 |
1 files changed, 14 insertions, 30 deletions
diff --git a/tests/lib/Files/SimpleFS/SimpleFileTest.php b/tests/lib/Files/SimpleFS/SimpleFileTest.php index def570edf99..6ce5ddad351 100644 --- a/tests/lib/Files/SimpleFS/SimpleFileTest.php +++ b/tests/lib/Files/SimpleFS/SimpleFileTest.php @@ -1,24 +1,8 @@ <?php + /** - * @copyright 2016 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: 2016 Nextcloud GmbH and Nextcloud contributors + * SPDX-License-Identifier: AGPL-3.0-or-later */ namespace Test\File\SimpleFS; @@ -42,7 +26,7 @@ class SimpleFileTest extends \Test\TestCase { $this->simpleFile = new SimpleFile($this->file); } - public function testGetName() { + public function testGetName(): void { $this->file->expects($this->once()) ->method('getName') ->willReturn('myname'); @@ -50,7 +34,7 @@ class SimpleFileTest extends \Test\TestCase { $this->assertEquals('myname', $this->simpleFile->getName()); } - public function testGetSize() { + public function testGetSize(): void { $this->file->expects($this->once()) ->method('getSize') ->willReturn(42); @@ -58,7 +42,7 @@ class SimpleFileTest extends \Test\TestCase { $this->assertEquals(42, $this->simpleFile->getSize()); } - public function testGetETag() { + public function testGetETag(): void { $this->file->expects($this->once()) ->method('getETag') ->willReturn('etag'); @@ -66,7 +50,7 @@ class SimpleFileTest extends \Test\TestCase { $this->assertEquals('etag', $this->simpleFile->getETag()); } - public function testGetMTime() { + public function testGetMTime(): void { $this->file->expects($this->once()) ->method('getMTime') ->willReturn(101); @@ -74,7 +58,7 @@ class SimpleFileTest extends \Test\TestCase { $this->assertEquals(101, $this->simpleFile->getMTime()); } - public function testGetContent() { + public function testGetContent(): void { $this->file->expects($this->once()) ->method('getContent') ->willReturn('foo'); @@ -82,7 +66,7 @@ class SimpleFileTest extends \Test\TestCase { $this->assertEquals('foo', $this->simpleFile->getContent()); } - public function testPutContent() { + public function testPutContent(): void { $this->file->expects($this->once()) ->method('putContent') ->with($this->equalTo('bar')); @@ -90,14 +74,14 @@ class SimpleFileTest extends \Test\TestCase { $this->simpleFile->putContent('bar'); } - public function testDelete() { + public function testDelete(): void { $this->file->expects($this->once()) ->method('delete'); $this->simpleFile->delete(); } - public function testGetMimeType() { + public function testGetMimeType(): void { $this->file->expects($this->once()) ->method('getMimeType') ->willReturn('app/awesome'); @@ -105,7 +89,7 @@ class SimpleFileTest extends \Test\TestCase { $this->assertEquals('app/awesome', $this->simpleFile->getMimeType()); } - public function testGetContentInvalidAppData() { + public function testGetContentInvalidAppData(): void { $this->file->method('getContent') ->willReturn(false); $this->file->method('stat')->willReturn(false); @@ -124,7 +108,7 @@ class SimpleFileTest extends \Test\TestCase { $this->simpleFile->getContent(); } - public function testRead() { + public function testRead(): void { $this->file->expects($this->once()) ->method('fopen') ->with('r'); @@ -132,7 +116,7 @@ class SimpleFileTest extends \Test\TestCase { $this->simpleFile->read(); } - public function testWrite() { + public function testWrite(): void { $this->file->expects($this->once()) ->method('fopen') ->with('w'); |