From c0bdd0f55b4761696079794647643ceb716f6c01 Mon Sep 17 00:00:00 2001 From: Niklas Keller Date: Wed, 1 Jul 2020 07:23:23 +0200 Subject: [PATCH] Fix watcher error --- test/FileTest.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/test/FileTest.php b/test/FileTest.php index 4779909..d3a4772 100644 --- a/test/FileTest.php +++ b/test/FileTest.php @@ -95,7 +95,7 @@ abstract class FileTest extends FilesystemTest $contents = ""; $position = 0; - $stat = yield File\getStatus(__FILE__); + $stat = yield $this->driver->getStatus(__FILE__); $chunkSize = (int) \floor(($stat["size"] / 5)); while (!$handle->eof()) { @@ -106,7 +106,7 @@ abstract class FileTest extends FilesystemTest } $this->assertNull(yield $handle->read()); - $this->assertSame(yield File\read(__FILE__), $contents); + $this->assertSame(yield $this->driver->read(__FILE__), $contents); yield $handle->close(); } @@ -120,7 +120,7 @@ abstract class FileTest extends FilesystemTest $contents .= yield $handle->read(10); $contents .= yield $handle->read(10); - $expected = \substr(yield File\read(__FILE__), 0, 20); + $expected = \substr(yield $this->driver->read(__FILE__), 0, 20); $this->assertSame($expected, $contents); yield $handle->close(); @@ -135,7 +135,7 @@ abstract class FileTest extends FilesystemTest $this->assertSame(10, $handle->tell()); $chunk = yield $handle->read(90); $this->assertSame(100, $handle->tell()); - $expected = \substr(yield File\read(__FILE__), 10, 90); + $expected = \substr(yield $this->driver->read(__FILE__), 10, 90); $this->assertSame($expected, $chunk); yield $handle->close(); @@ -168,7 +168,7 @@ abstract class FileTest extends FilesystemTest public function testSeekSetEnd(): \Generator { - $size = yield File\getSize(__FILE__); + $size = \filesize(__FILE__); /** @var File\File $handle */ $handle = yield $this->driver->openFile(__FILE__, "r"); $this->assertSame(0, $handle->tell());