diff options
Diffstat (limited to 'apps/dav/tests/unit/Upload')
-rw-r--r-- | apps/dav/tests/unit/Upload/AssemblyStreamTest.php | 7 | ||||
-rw-r--r-- | apps/dav/tests/unit/Upload/FutureFileTest.php | 7 |
2 files changed, 8 insertions, 6 deletions
diff --git a/apps/dav/tests/unit/Upload/AssemblyStreamTest.php b/apps/dav/tests/unit/Upload/AssemblyStreamTest.php index a8517bf757c..51c53fb262f 100644 --- a/apps/dav/tests/unit/Upload/AssemblyStreamTest.php +++ b/apps/dav/tests/unit/Upload/AssemblyStreamTest.php @@ -7,6 +7,7 @@ */ namespace OCA\DAV\Tests\unit\Upload; +use OCA\DAV\Upload\AssemblyStream; use Sabre\DAV\File; class AssemblyStreamTest extends \Test\TestCase { @@ -15,7 +16,7 @@ class AssemblyStreamTest extends \Test\TestCase { * @dataProvider providesNodes() */ public function testGetContents($expected, $nodes): void { - $stream = \OCA\DAV\Upload\AssemblyStream::wrap($nodes); + $stream = AssemblyStream::wrap($nodes); $content = stream_get_contents($stream); $this->assertEquals($expected, $content); @@ -25,7 +26,7 @@ class AssemblyStreamTest extends \Test\TestCase { * @dataProvider providesNodes() */ public function testGetContentsFread($expected, $nodes): void { - $stream = \OCA\DAV\Upload\AssemblyStream::wrap($nodes); + $stream = AssemblyStream::wrap($nodes); $content = ''; while (!feof($stream)) { @@ -39,7 +40,7 @@ class AssemblyStreamTest extends \Test\TestCase { * @dataProvider providesNodes() */ public function testSeek($expected, $nodes): void { - $stream = \OCA\DAV\Upload\AssemblyStream::wrap($nodes); + $stream = AssemblyStream::wrap($nodes); $offset = floor(strlen($expected) * 0.6); if (fseek($stream, $offset) === -1) { diff --git a/apps/dav/tests/unit/Upload/FutureFileTest.php b/apps/dav/tests/unit/Upload/FutureFileTest.php index 9ec455a9595..750670992eb 100644 --- a/apps/dav/tests/unit/Upload/FutureFileTest.php +++ b/apps/dav/tests/unit/Upload/FutureFileTest.php @@ -8,6 +8,7 @@ namespace OCA\DAV\Tests\unit\Upload; use OCA\DAV\Connector\Sabre\Directory; +use OCA\DAV\Upload\FutureFile; class FutureFileTest extends \Test\TestCase { public function testGetContentType(): void { @@ -50,7 +51,7 @@ class FutureFileTest extends \Test\TestCase { $d->expects($this->once()) ->method('delete'); - $f = new \OCA\DAV\Upload\FutureFile($d, 'foo.txt'); + $f = new FutureFile($d, 'foo.txt'); $f->delete(); } @@ -71,7 +72,7 @@ class FutureFileTest extends \Test\TestCase { } /** - * @return \OCA\DAV\Upload\FutureFile + * @return FutureFile */ private function mockFutureFile() { $d = $this->getMockBuilder(Directory::class) @@ -91,6 +92,6 @@ class FutureFileTest extends \Test\TestCase { ->method('getChildren') ->willReturn([]); - return new \OCA\DAV\Upload\FutureFile($d, 'foo.txt'); + return new FutureFile($d, 'foo.txt'); } } |