Gush\Tests\ConfigFactoryTest::testCreateConfigWithExistingHomeConfig PHP Метод

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

    public function testCreateConfigWithExistingHomeConfig()
    {
        $content = <<<EOT
adapters:
    github:
        config: { base_url: 'https://api.github.com/', repo_domain_url: 'https://github.com' }
        authentication: { username: cordoval, password-or-token: password, http-auth-type: http_password }
EOT;
        file_put_contents($this->homedir . '/.gush.yml', $content);
        $config = ConfigFactory::createConfig();
        $this->assertEquals(['adapters' => ['github' => ['config' => ['base_url' => 'https://api.github.com/', 'repo_domain_url' => 'https://github.com'], 'authentication' => ['username' => 'cordoval', 'password-or-token' => 'password', 'http-auth-type' => 'http_password']]], 'home' => $this->homedir, 'home_config' => $this->homedir . '/.gush.yml'], $config->toArray(Config::CONFIG_ALL));
        $this->assertEquals(['adapters' => ['github' => ['config' => ['base_url' => 'https://api.github.com/', 'repo_domain_url' => 'https://github.com'], 'authentication' => ['username' => 'cordoval', 'password-or-token' => 'password', 'http-auth-type' => 'http_password']]]], $config->toArray(Config::CONFIG_SYSTEM));
        $this->assertEquals([], $config->toArray(Config::CONFIG_LOCAL));
    }