Dependecies for rclone
This commit is contained in:
@ -10,6 +10,8 @@ pipeline:
|
||||
test:
|
||||
image: composer
|
||||
commands:
|
||||
- apt update
|
||||
- apt install rclone
|
||||
- composer install
|
||||
- ./vendor/bin/phpunit tests
|
||||
tools:
|
||||
|
2
Makefile
2
Makefile
@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user