Skip to content

Commit

Permalink
thephpleague#98: reverted original rename test
Browse files Browse the repository at this point in the history
  • Loading branch information
proggeler committed Dec 27, 2019
1 parent d755eab commit d4527dd
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions tests/SftpAdapterTests.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit d4527dd

Please sign in to comment.