Gush\Tests\Command\Core\CoreInitCommandTest::testLocalConfiguringWithAllOptionsInNonInteractive PHP Метод

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

    public function testLocalConfiguringWithAllOptionsInNonInteractive()
    {
        $command = new InitCommand();
        $tester = $this->getCommandTester($command, [], []);
        $tester->execute(['command' => $command->getName(), '--repo-adapter' => 'github', '--org' => 'MyOrg', '--repo' => 'MyRepo', '--issue-adapter' => 'github', '--issue-org' => 'IOrg', '--issue-project' => 'IRepo'], ['interactive' => false]);
        $display = $tester->getDisplay(true);
        $this->assertCommandOutputMatches(['Repository-manager "GitHub" is not configured yet.', 'Issue-tracker "GitHub" is not configured yet.', 'Run the "core:configure" command to configure the adapters.', ['\\[OK\\]\\sConfiguration file saved successfully\\.$', true]], $display);
        $expected = ['repo_adapter' => 'github', 'issue_tracker' => 'github', 'repo_org' => 'MyOrg', 'repo_name' => 'MyRepo', 'issue_project_org' => 'IOrg', 'issue_project_name' => 'IRepo'];
        $this->assertFileExists($command->getConfig()->get('local_config'));
        $this->assertEquals($expected, $command->getConfig()->toArray(Config::CONFIG_LOCAL));
    }