mirror of
https://github.com/SociallyDev/Spaces-API.git
synced 2025-07-14 17:13:01 -07:00
Added a file move method
This commit is contained in:
parent
bdd06aa0b7
commit
6b438e0b9a
3 changed files with 49 additions and 0 deletions
|
@ -62,6 +62,17 @@ class FileTest extends TestCase
|
|||
self::$space->file('lorem-ipsum-2.txt');
|
||||
}
|
||||
|
||||
public function testCanMoveRenameFile()
|
||||
{
|
||||
$file = self::$file->copy('test.txt');
|
||||
$file->move('renamed-file.txt');
|
||||
|
||||
$this->assertEquals("Lorem ipsum", self::$space->file('renamed-file.txt')->getContents());
|
||||
|
||||
$this->expectException(FileDoesntExistException::class);
|
||||
self::$space->file('test.txt');
|
||||
}
|
||||
|
||||
public function testCanGetURL()
|
||||
{
|
||||
$this->assertStringContainsString('lorem-ipsum.txt', self::$file->getURL());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue