Quality of life improvements all around.
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed

This commit is contained in:
2023-07-13 11:34:56 +00:00
parent 4645488b5d
commit 6ac9fd5575
14 changed files with 105 additions and 15 deletions

View File

@ -23,15 +23,15 @@ final class RcloneTest extends TestCase
public function testRclonePath(): void
{
$this->expectException(\Exception::class);
$rclone = new Rclone('invalid');
$this->assertEquals('', $rclone->getVersion());
new Rclone('invalid');
$this->fail('Exception was not thrown');
}
public function testRcloneInvalidVersion(): void
{
$this->expectException(\Exception::class);
$rclone = new Rclone('uname');
$this->assertEquals('', $rclone->getVersion());
new Rclone('uname');
$this->fail('Exception was not thrown');
}
public function testRcloneValidVersion(): void
@ -49,7 +49,7 @@ final class RcloneTest extends TestCase
$this->expectException(\Exception::class);
$this->expectExceptionMessage("ERROR");
$size = $rclone->getSize('temp/bogus-source');
$this->assertEquals(0, $size);
$this->fail('Exception was not thrown');
}
public function testRcloneCopy(): void
@ -65,6 +65,6 @@ final class RcloneTest extends TestCase
$this->expectException(\Exception::class);
$this->expectExceptionMessage("ERROR");
$rclone->copy('temp/bogus-source', 'temp/bogus-destination');
$this->assertDirectoryDoesNotExist('temp/bogus-destination');
$this->fail('Exception was not thrown');
}
}