aboutsummaryrefslogtreecommitdiffstats
path: root/library/kzykhys/git/test/PHPGit/Exception
diff options
context:
space:
mode:
Diffstat (limited to 'library/kzykhys/git/test/PHPGit/Exception')
-rw-r--r--library/kzykhys/git/test/PHPGit/Exception/GitExceptionTest.php23
1 files changed, 23 insertions, 0 deletions
diff --git a/library/kzykhys/git/test/PHPGit/Exception/GitExceptionTest.php b/library/kzykhys/git/test/PHPGit/Exception/GitExceptionTest.php
new file mode 100644
index 000000000..154d6b906
--- /dev/null
+++ b/library/kzykhys/git/test/PHPGit/Exception/GitExceptionTest.php
@@ -0,0 +1,23 @@
+<?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);
+ }
+ }
+
+} \ No newline at end of file