diff options
author | Willy Micieli <micieli@laposte.net> | 2019-11-05 18:11:21 +0100 |
---|---|---|
committer | Willy Micieli <micieli@laposte.net> | 2019-11-05 18:11:21 +0100 |
commit | 16d58d8d2119e13e1bc3d648fc2701b140851433 (patch) | |
tree | e8530f9eb11f46feaf90a18708653e874ce455da | |
parent | 0268298fa8498b6c3c07cb1384a136fb8801a9ea (diff) | |
download | imperium-16d58d8d2119e13e1bc3d648fc2701b140851433.zip imperium-16d58d8d2119e13e1bc3d648fc2701b140851433.tar.gz |
update git test repository path
-rw-r--r-- | imperium/Versioning/Git.php | 2 | ||||
-rw-r--r-- | tests/Versioning/GitTest.php | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/imperium/Versioning/Git.php b/imperium/Versioning/Git.php index cd8af2b..78e36b2 100644 --- a/imperium/Versioning/Git.php +++ b/imperium/Versioning/Git.php @@ -57,7 +57,7 @@ $this->redis = new Redis(); - $this->repository = equal($repository,'.') ? collect(explode('/',realpath($repository)))->last(): $repository; + $this->repository = collect(explode(DIRECTORY_SEPARATOR,realpath($repository)))->last(); $this->owner = $owner; diff --git a/tests/Versioning/GitTest.php b/tests/Versioning/GitTest.php index 630f88b..7bd240f 100644 --- a/tests/Versioning/GitTest.php +++ b/tests/Versioning/GitTest.php @@ -22,9 +22,9 @@ class GitTest extends Unit */ public function setUp(): void { - $this->git = $this->git('.','willy'); + $this->git = $this->git('/home/willy/imperium','willy'); } - + public function test_base() { $this->assertEquals('imperium',$this->git->name()); @@ -42,7 +42,7 @@ class GitTest extends Unit } public function test_branch() { - $this->assertEquals('develop',$this->git->current_branch()); + $this->assertEquals('master',$this->git->current_branch()); } public function test_commit_size() { @@ -82,4 +82,4 @@ class GitTest extends Unit $this->assertNotEmpty($this->git->releases()); } -}
\ No newline at end of file +} |