Dependecies for rclone

This commit is contained in:
Jens True 2023-06-15 10:56:05 +00:00
parent 3efa791d5e
commit baf34236f0
4 changed files with 6 additions and 10 deletions

@ -10,6 +10,8 @@ pipeline:
test:
image: composer
commands:
- apt update
- apt install rclone
- composer install
- ./vendor/bin/phpunit tests
tools:

@ -15,8 +15,6 @@ install:
php composer.phar install --no-dev
install-dev:
php composer.phar install
sudo apt update
sudo apt install rclone
test:
vendor/bin/phpunit tests
test-coverage:

@ -24,9 +24,8 @@ class CommandBackup extends Command
{
$this->addArgument(
'config',
InputArgument::OPTIONAL,
'Configuration file',
"config.yml"
InputArgument::REQUIRED,
'Configuration file'
);
}

@ -8,7 +8,7 @@ use App\CommandBackup;
class CommandBackupTest extends \PHPUnit\Framework\TestCase
{
public function testExecute()
public function testInvalidConfig()
{
$applicationd = new Application('backup', "1.1.1");
@ -18,11 +18,8 @@ class CommandBackupTest extends \PHPUnit\Framework\TestCase
$command = $applicationd->find('backup');
$commandTester = new CommandTester($command);
$commandTester->execute([]);
$commandTester->execute(['config'=>"empty"]);
$commandTester->assertCommandIsSuccessful();
// the output of the command in the console
$output = $commandTester->getDisplay();
$this->assertStringContainsString('backup', $output);
}