From d4527dd09337b76bc47d19a2d5b6e8c273dd3953 Mon Sep 17 00:00:00 2001 From: proggeler Date: Fri, 27 Dec 2019 10:18:09 +0100 Subject: [PATCH] #98: reverted original rename test --- tests/SftpAdapterTests.php | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/tests/SftpAdapterTests.php b/tests/SftpAdapterTests.php index 762abdb..f633358 100644 --- a/tests/SftpAdapterTests.php +++ b/tests/SftpAdapterTests.php @@ -179,21 +179,12 @@ public function testSetVisibilityInvalid($filesystem, $adapter, $mock) */ public function testRename($filesystem, $adapter, $mock) { - $mock->shouldReceive('stat')->with('old')->andReturn([ - 'type' => NET_SFTP_TYPE_REGULAR, // file - 'mtime' => time(), - 'size' => 20, - 'permissions' => 0777, - ]); - $mock->shouldReceive('stat')->with('old')->andReturn(false); - $mock->shouldReceive('stat')->with('.')->andReturn([ + $mock->shouldReceive('stat')->andReturn([ 'type' => NET_SFTP_TYPE_DIRECTORY, 'mtime' => time(), 'size' => 20, 'permissions' => 0777, - ]); - $mock->shouldReceive('mkdir')->never()->with('.', $adapter->getDirectoryPerm(), true); - + ], false); $mock->shouldReceive('rename')->andReturn(true); $result = $filesystem->rename('old', 'new'); $this->assertTrue($result);