mirror of
https://codeberg.org/streams/streams.git
synced 2024-09-24 00:15:43 +00:00
23 lines
No EOL
591 B
PHP
23 lines
No EOL
591 B
PHP
<?php
|
|
|
|
use PHPGit\Exception\GitException;
|
|
use PHPGit\Git;
|
|
|
|
class GitExceptionTest extends PHPUnit_Framework_TestCase
|
|
{
|
|
|
|
public function testException()
|
|
{
|
|
$git = new Git();
|
|
$git->setRepository(sys_get_temp_dir());
|
|
try {
|
|
$git->status();
|
|
$this->fail('Previous operation should fail');
|
|
} catch (GitException $e) {
|
|
$command = $e->getCommandLine();
|
|
$command = str_replace(array('"', "'"), '', $command);
|
|
$this->assertStringEndsWith('status --porcelain -s -b --null', $command);
|
|
}
|
|
}
|
|
|
|
}
|