2023-05-31 09:42:39 +00:00
|
|
|
<?php declare(strict_types=1);
|
|
|
|
use PHPUnit\Framework\TestCase;
|
|
|
|
|
|
|
|
final class RcloneTest extends TestCase
|
|
|
|
{
|
2023-05-31 10:12:52 +00:00
|
|
|
public function testRclonePath(): void
|
2023-05-31 09:42:39 +00:00
|
|
|
{
|
|
|
|
$this->expectException(\Exception::class);
|
|
|
|
$rclone = new \App\Rclone\Rclone('invalid');
|
|
|
|
}
|
|
|
|
|
2023-05-31 10:12:52 +00:00
|
|
|
public function testRcloneInvalidVersion(): void
|
|
|
|
{
|
|
|
|
$this->expectException(\Exception::class);
|
|
|
|
$rclone = new \App\Rclone\Rclone('uname');
|
|
|
|
}
|
2023-05-31 09:42:39 +00:00
|
|
|
|
2023-05-31 10:12:52 +00:00
|
|
|
public function testRcloneValidVersion(): void
|
2023-05-31 09:42:39 +00:00
|
|
|
{
|
2023-05-31 10:12:52 +00:00
|
|
|
$rclone = new \App\Rclone\Rclone('./tests/mock-rclone');
|
|
|
|
$this->assertStringContainsString('rclone', $rclone->getVersion());
|
2023-05-31 09:42:39 +00:00
|
|
|
}
|
|
|
|
}
|