N98\Magento\Application\ConfigTest::configCommandAlias PHP Метод

configCommandAlias() публичный Метод

public configCommandAlias ( )
    public function configCommandAlias()
    {
        $config = new Config();
        $input = new ArgvInput();
        $actual = $config->checkConfigCommandAlias($input);
        $this->assertInstanceOf('Symfony\\Component\\Console\\Input\\InputInterface', $actual);
        $saved = $_SERVER['argv'];
        $config->setConfig(array('commands' => array('aliases' => array(array('list-help' => 'list --help')))));
        $definition = new InputDefinition();
        $definition->addArgument(new InputArgument('command'));
        $argv = array('/path/to/command', 'list-help');
        $_SERVER['argv'] = $argv;
        $input = new ArgvInput($argv, $definition);
        $this->assertSame('list-help', (string) $input);
        $actual = $config->checkConfigCommandAlias($input);
        $this->assertSame('list-help', $actual->getFirstArgument());
        $this->assertSame('list-help --help', (string) $actual);
        $_SERVER['argv'] = $saved;
        $command = new Command('list');
        $config->registerConfigCommandAlias($command);
        $this->assertSame(array('list-help'), $command->getAliases());
    }