GitWrapper\Test\GitWorkingCopyTest::testGitPullErrorWithEmptyErrorOutput PHP Метод

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

This tests an odd case where sometimes even though a command fails and an exception is thrown the result of Process::getErrorOutput() is empty because the output is sent to STDOUT instead of STDERR. So there's a code path in GitProcess::run() to check the output from Process::getErrorOutput() and if it's empty use the result from Process::getOutput() instead
    public function testGitPullErrorWithEmptyErrorOutput()
    {
        $git = $this->getWorkingCopy();
        try {
            $git->commit('Nothing to commit so generates an error / not error');
        } catch (GitException $exception) {
            $errorOutput = $exception->getMessage();
        }
        $this->assertTrue(strpos($errorOutput, "Your branch is up-to-date with 'origin/master'.") !== false);
    }