This commit is contained in:
@ -1,5 +1,6 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
use App\Rclone\Rclone;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
final class RcloneTest extends TestCase
|
||||
@ -18,26 +19,26 @@ final class RcloneTest extends TestCase
|
||||
public function testRclonePath(): void
|
||||
{
|
||||
$this->expectException(\Exception::class);
|
||||
$rclone = new \App\Rclone\Rclone('invalid');
|
||||
$rclone = new Rclone('invalid');
|
||||
$this->assertString('', $rclone->getVersion());
|
||||
}
|
||||
|
||||
public function testRcloneInvalidVersion(): void
|
||||
{
|
||||
$this->expectException(\Exception::class);
|
||||
$rclone = new \App\Rclone\Rclone('uname');
|
||||
$rclone = new Rclone('uname');
|
||||
$this->assertString('', $rclone->getVersion());
|
||||
}
|
||||
|
||||
public function testRcloneValidVersion(): void
|
||||
{
|
||||
$rclone = new \App\Rclone\Rclone();
|
||||
$rclone = new Rclone();
|
||||
$this->assertStringContainsString('rclone', $rclone->getVersion());
|
||||
}
|
||||
|
||||
public function testRcloneSize(): void
|
||||
{
|
||||
$rclone = new \App\Rclone\Rclone();
|
||||
$rclone = new Rclone();
|
||||
$size = $rclone->getSize('temp/source');
|
||||
$this->assertGreaterThan(10000, $size);
|
||||
|
||||
@ -49,11 +50,11 @@ final class RcloneTest extends TestCase
|
||||
|
||||
public function testRcloneCopy(): void
|
||||
{
|
||||
$rclone = new \App\Rclone\Rclone();
|
||||
$rclone = new Rclone();
|
||||
$result = $rclone->copy('temp/source','temp/destination');
|
||||
$this->assertDirectoryExists('temp/destination');
|
||||
|
||||
$rclone = new \App\Rclone\Rclone();
|
||||
$rclone = new Rclone();
|
||||
$result = $rclone->copy('temp/source','temp/destination',['bwlimit'=>'6M']);
|
||||
$this->assertDirectoryExists('temp/destination');
|
||||
|
||||
|
Reference in New Issue
Block a user