File tree Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -52,7 +52,7 @@ private function isGitRepository($path)
52
52
return false ;
53
53
}
54
54
55
- if (is_dir ($ path . DIRECTORY_SEPARATOR . '.git ' )) {
55
+ if (file_exists ($ path . DIRECTORY_SEPARATOR . '.git ' )) {
56
56
return true ;
57
57
}
58
58
Original file line number Diff line number Diff line change @@ -93,13 +93,23 @@ public function testIsSupportedGitDescribeError()
93
93
/**
94
94
* @covers \Shivas\VersioningBundle\Provider\GitRepositoryProvider::isSupported
95
95
*/
96
- public function testIsSupported ()
96
+ public function testIsSupportedDir ()
97
97
{
98
98
vfsStream::newDirectory ('.git ' )->at ($ this ->root );
99
99
self ::$ gitDescribeOutput = '1.2.3 ' ;
100
100
$ this ->assertTrue ($ this ->gitRepositoryProvider ->isSupported ());
101
101
}
102
102
103
+ /**
104
+ * @covers \Shivas\VersioningBundle\Provider\GitRepositoryProvider::isSupported
105
+ */
106
+ public function testIsSupportedFile ()
107
+ {
108
+ vfsStream::newFile ('.git ' )->at ($ this ->root );
109
+ self ::$ gitDescribeOutput = '1.2.3 ' ;
110
+ $ this ->assertTrue ($ this ->gitRepositoryProvider ->isSupported ());
111
+ }
112
+
103
113
/**
104
114
* @covers \Shivas\VersioningBundle\Provider\GitRepositoryProvider::getVersion
105
115
*/
You can’t perform that action at this time.
0 commit comments