Skip to content

Commit 88818ec

Browse files
committed
Add tests to check remote url
1 parent 5a33c45 commit 88818ec

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

tests/Gitonomy/Git/Tests/AdminTest.php

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,23 @@ public function testMirror($repository)
100100
}
101101
}
102102

103+
/**
104+
* @dataProvider provideFoobar
105+
*/
106+
public function testCheckValidRepository($repository)
107+
{
108+
$url = $repository->getGitDir();
109+
$this->assertTrue(Admin::isValidRepository($url));
110+
}
111+
112+
public function testCheckInvalidRepository()
113+
{
114+
$url = $this->tmpDir.'/invalid.git';
115+
mkdir($url);
116+
117+
$this->assertFalse(Admin::isValidRepository($url));
118+
}
119+
103120
/**
104121
* @expectedException RuntimeException
105122
*/

0 commit comments

Comments
 (0)