diff options
Diffstat (limited to 'tests/lib/Files/Stream')
-rw-r--r-- | tests/lib/Files/Stream/DummyEncryptionWrapper.php | 4 | ||||
-rw-r--r-- | tests/lib/Files/Stream/HashWrapperTest.php | 2 | ||||
-rw-r--r-- | tests/lib/Files/Stream/QuotaTest.php | 8 |
3 files changed, 9 insertions, 5 deletions
diff --git a/tests/lib/Files/Stream/DummyEncryptionWrapper.php b/tests/lib/Files/Stream/DummyEncryptionWrapper.php index 211050905bd..6846762cb67 100644 --- a/tests/lib/Files/Stream/DummyEncryptionWrapper.php +++ b/tests/lib/Files/Stream/DummyEncryptionWrapper.php @@ -7,7 +7,9 @@ namespace Test\Files\Stream; -class DummyEncryptionWrapper extends \OC\Files\Stream\Encryption { +use OC\Files\Stream\Encryption; + +class DummyEncryptionWrapper extends Encryption { /** * simulate a non-seekable stream wrapper by always return false * diff --git a/tests/lib/Files/Stream/HashWrapperTest.php b/tests/lib/Files/Stream/HashWrapperTest.php index 1e9bbd8f289..66dee77b607 100644 --- a/tests/lib/Files/Stream/HashWrapperTest.php +++ b/tests/lib/Files/Stream/HashWrapperTest.php @@ -25,7 +25,7 @@ class HashWrapperTest extends TestCase { $data = $tmpData; } - $wrapper = HashWrapper::wrap($data, $algo, function ($result) use ($hash) { + $wrapper = HashWrapper::wrap($data, $algo, function ($result) use ($hash): void { $this->assertEquals($hash, $result); }); stream_get_contents($wrapper); diff --git a/tests/lib/Files/Stream/QuotaTest.php b/tests/lib/Files/Stream/QuotaTest.php index 2df767d6c60..31c0f6c1453 100644 --- a/tests/lib/Files/Stream/QuotaTest.php +++ b/tests/lib/Files/Stream/QuotaTest.php @@ -7,6 +7,8 @@ namespace Test\Files\Stream; +use OC\Files\Stream\Quota; + class QuotaTest extends \Test\TestCase { /** * @param string $mode @@ -15,7 +17,7 @@ class QuotaTest extends \Test\TestCase { */ protected function getStream($mode, $limit) { $source = fopen('php://temp', $mode); - return \OC\Files\Stream\Quota::wrap($source, $limit); + return Quota::wrap($source, $limit); } public function testWriteEnoughSpace(): void { @@ -60,7 +62,7 @@ class QuotaTest extends \Test\TestCase { public function testWriteNotEnoughSpaceExistingStream(): void { $source = fopen('php://temp', 'w+'); fwrite($source, 'foobar'); - $stream = \OC\Files\Stream\Quota::wrap($source, 3); + $stream = Quota::wrap($source, 3); $this->assertEquals(3, fwrite($stream, 'foobar')); rewind($stream); $this->assertEquals('foobarfoo', fread($stream, 100)); @@ -69,7 +71,7 @@ class QuotaTest extends \Test\TestCase { public function testWriteNotEnoughSpaceExistingStreamRewind(): void { $source = fopen('php://temp', 'w+'); fwrite($source, 'foobar'); - $stream = \OC\Files\Stream\Quota::wrap($source, 3); + $stream = Quota::wrap($source, 3); rewind($stream); $this->assertEquals(6, fwrite($stream, 'qwerty')); rewind($stream); |