GitWrapper\Test\GitWorkingCopyTest::testGetRemotes PHP Method

testGetRemotes() public method

public testGetRemotes ( )
    public function testGetRemotes()
    {
        $this->createRemote();
        $git = $this->getWorkingCopy();
        // Since our working copy is a clone, the 'origin' remote should be
        // present by default.
        $remotes = $git->getRemotes();
        $this->assertArrayHasKey('origin', $remotes);
        $this->assertArrayNotHasKey('remote', $remotes);
        // If we add a second remote, both it and the 'origin' remotes should be
        // present.
        $git->addRemote('remote', 'file://' . realpath(self::REMOTE_REPO_DIR));
        $remotes = $git->getRemotes();
        $this->assertArrayHasKey('origin', $remotes);
        $this->assertArrayHasKey('remote', $remotes);
    }