for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace DaveLiddament\StaticAnalysisResultsBaseliner\Tests\Unit\Plugins\GitDiffHistoryAnalyser\internal;
use DaveLiddament\StaticAnalysisResultsBaseliner\Domain\Common\ProjectRoot;
use DaveLiddament\StaticAnalysisResultsBaseliner\Plugins\GitDiffHistoryAnalyser\GitCommit;
use DaveLiddament\StaticAnalysisResultsBaseliner\Plugins\GitDiffHistoryAnalyser\GitException;
use DaveLiddament\StaticAnalysisResultsBaseliner\Plugins\GitDiffHistoryAnalyser\internal\GitCliWrapper;
use PHPUnit\Framework\TestCase;
final class GitCliWrapperTest extends TestCase
{
public function testGitDiffCommandFails(): void
$projectRoot = ProjectRoot::fromCurrentWorkingDirectory(__DIR__);
$gitCliWrapper = new GitCliWrapper();
$nonExistentGitSha = new GitCommit('0000000000000000000000000000000000000000');
$this->expectException(GitException::class);
$gitCliWrapper->getGitDiff($projectRoot, $nonExistentGitSha);
}
public function testGetGitShaCommandFails(): void
$gitCliWrapper->getCurrentSha($projectRoot);