Dependecies for rclone
This commit is contained in:
@ -10,6 +10,8 @@ pipeline:
|
|||||||
test:
|
test:
|
||||||
image: composer
|
image: composer
|
||||||
commands:
|
commands:
|
||||||
|
- apt update
|
||||||
|
- apt install rclone
|
||||||
- composer install
|
- composer install
|
||||||
- ./vendor/bin/phpunit tests
|
- ./vendor/bin/phpunit tests
|
||||||
tools:
|
tools:
|
||||||
|
2
Makefile
2
Makefile
@ -15,8 +15,6 @@ install:
|
|||||||
php composer.phar install --no-dev
|
php composer.phar install --no-dev
|
||||||
install-dev:
|
install-dev:
|
||||||
php composer.phar install
|
php composer.phar install
|
||||||
sudo apt update
|
|
||||||
sudo apt install rclone
|
|
||||||
test:
|
test:
|
||||||
vendor/bin/phpunit tests
|
vendor/bin/phpunit tests
|
||||||
test-coverage:
|
test-coverage:
|
||||||
|
@ -24,9 +24,8 @@ class CommandBackup extends Command
|
|||||||
{
|
{
|
||||||
$this->addArgument(
|
$this->addArgument(
|
||||||
'config',
|
'config',
|
||||||
InputArgument::OPTIONAL,
|
InputArgument::REQUIRED,
|
||||||
'Configuration file',
|
'Configuration file'
|
||||||
"config.yml"
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@ use App\CommandBackup;
|
|||||||
|
|
||||||
class CommandBackupTest extends \PHPUnit\Framework\TestCase
|
class CommandBackupTest extends \PHPUnit\Framework\TestCase
|
||||||
{
|
{
|
||||||
public function testExecute()
|
public function testInvalidConfig()
|
||||||
{
|
{
|
||||||
|
|
||||||
$applicationd = new Application('backup', "1.1.1");
|
$applicationd = new Application('backup', "1.1.1");
|
||||||
@ -18,11 +18,8 @@ class CommandBackupTest extends \PHPUnit\Framework\TestCase
|
|||||||
|
|
||||||
$command = $applicationd->find('backup');
|
$command = $applicationd->find('backup');
|
||||||
$commandTester = new CommandTester($command);
|
$commandTester = new CommandTester($command);
|
||||||
$commandTester->execute([]);
|
$commandTester->execute(['config'=>"empty"]);
|
||||||
|
|
||||||
$commandTester->assertCommandIsSuccessful();
|
|
||||||
|
|
||||||
// the output of the command in the console
|
|
||||||
$output = $commandTester->getDisplay();
|
$output = $commandTester->getDisplay();
|
||||||
$this->assertStringContainsString('backup', $output);
|
$this->assertStringContainsString('backup', $output);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user