diff --git a/tests/Storage/Flysystem/AbstractFlysystemStorageTestCase.php b/tests/Storage/Flysystem/AbstractFlysystemStorageTestCase.php index 6df93878..489bfba3 100644 --- a/tests/Storage/Flysystem/AbstractFlysystemStorageTestCase.php +++ b/tests/Storage/Flysystem/AbstractFlysystemStorageTestCase.php @@ -32,13 +32,6 @@ abstract class AbstractFlysystemStorageTestCase extends StorageTestCase abstract protected function createRegistry(FilesystemOperator $filesystem): MountManager|ContainerInterface; - /** - * @requires function MountManager::__construct - */ - public static function setUpBeforeClass(): void - { - } - protected function getStorage(): StorageInterface { return new FlysystemStorage($this->factory, $this->registry, $this->useFlysystemToResolveUri); @@ -84,7 +77,7 @@ public function testUpload(): void $this->filesystem ->expects(self::once()) - ->method('putStream') + ->method('writeStream') ->with( 'originalName.txt', $this->isType('resource'), @@ -122,6 +115,8 @@ public function testRemoveOnNonExistentFile(): void ->method('getFileName') ->willReturn('not_found.txt'); + $this->expectException(UnableToDeleteFile::class); + $this->expectExceptionMessage('dummy path'); $this->storage->remove($this->object, $this->mapping); } @@ -156,9 +151,9 @@ public static function pathProvider(): array return [ // dir, path, relative [null, 'file.txt', true], - [null, '/absolute/file.txt', false], + [null, 'file.txt', false], ['foo', 'foo/file.txt', true], - ['foo', '/absolute/foo/file.txt', false], + ['foo', 'foo/file.txt', false], ]; } diff --git a/tests/Storage/Flysystem/MountManagerFlysystemStorageTest.php b/tests/Storage/Flysystem/MountManagerFlysystemStorageTest.php index f7ae3db5..e4d89722 100644 --- a/tests/Storage/Flysystem/MountManagerFlysystemStorageTest.php +++ b/tests/Storage/Flysystem/MountManagerFlysystemStorageTest.php @@ -11,6 +11,13 @@ */ final class MountManagerFlysystemStorageTest extends AbstractFlysystemStorageTestCase { + /** + * @requires function MountManager::__construct + */ + public static function setUpBeforeClass(): void + { + } + protected function createRegistry(FilesystemOperator $filesystem): MountManager { $mountManager = $this->createMock(MountManager::class);