GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Passed
Push — master ( 38eb10...d581fd )
by Anton
02:47
created

IOArgumentsTest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 14
dl 0
loc 21
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A testCollect() 0 19 1
1
<?php
2
3
namespace Deployer\Ssh;
4
5
use PHPUnit\Framework\TestCase;
6
use Symfony\Component\Console\Input\ArgvInput;
7
use Symfony\Component\Console\Input\InputDefinition;
8
use Symfony\Component\Console\Input\InputOption;
9
use Symfony\Component\Console\Output\ConsoleOutput;
10
use Symfony\Component\Console\Output\OutputInterface;
11
12
class IOArgumentsTest extends TestCase
13
{
14
    public function testCollect()
15
    {
16
        $definition = new InputDefinition([
17
            new InputOption('option', 'o', InputOption::VALUE_REQUIRED | InputOption::VALUE_IS_ARRAY, 'Set configuration option'),
18
            new InputOption('limit', 'l', InputOption::VALUE_REQUIRED, 'How many tasks to run in parallel?'),
19
            new InputOption('no-hooks', null, InputOption::VALUE_NONE, 'Run tasks without after/before hooks'),
20
            new InputOption('plan', null, InputOption::VALUE_NONE, 'Show execution plan'),
21
            new InputOption('start-from', null, InputOption::VALUE_REQUIRED, 'Start execution from this task'),
22
            new InputOption('log', null, InputOption::VALUE_REQUIRED, 'Write log to a file'),
23
            new InputOption('profile', null, InputOption::VALUE_REQUIRED, 'Write profile to a file', ),
24
            new InputOption('ansi', null, InputOption::VALUE_OPTIONAL, 'Force ANSI output', ),
25
        ]);
26
27
        $args = IOArguments::collect(
28
            new ArgvInput(['deploy', '-o', 'env=prod', '--ansi', '-l1'], $definition),
29
            new ConsoleOutput(OutputInterface::VERBOSITY_DEBUG, false),
30
        );
31
32
        self::assertEquals(['--option','env=prod', '--limit', '1', '-vvv'], $args);
33
    }
34
}
35