* Adjust svn code error for unit test.
This commit is contained in:
@@ -262,9 +262,9 @@ class svnModel extends model
|
||||
$this->client = $repo->client . " --non-interactive";
|
||||
if(stripos($repo->path, 'https') === 0 || stripos($repo->path, 'svn') === 0)
|
||||
{
|
||||
$cmd = $repo->client . ' --version --quiet';
|
||||
$cmd = $repo->client . ' --version --quiet';
|
||||
$version = `$cmd`;
|
||||
if(version_compare($version, '1.6.0', '>'))
|
||||
if(version_compare((string)$version, '1.6.0', '>'))
|
||||
{
|
||||
$this->client .= ' --trust-server-cert';
|
||||
}
|
||||
@@ -406,7 +406,7 @@ class svnModel extends model
|
||||
* @access private
|
||||
* @return object|false
|
||||
*/
|
||||
private function getRepoByURL(string $url): object|false
|
||||
public function getRepoByURL(string $url): object|false
|
||||
{
|
||||
if(empty($this->repos)) $this->setRepos();
|
||||
foreach($this->repos as $repo)
|
||||
|
||||
@@ -23,7 +23,14 @@ class svnTest
|
||||
return $this->objectModel->dao->select('*')->from(TABLE_REPOHISTORY)->where('id')->eq(2)->fetch();
|
||||
}
|
||||
|
||||
public function getRepoLogsTest(int $version): object|bool
|
||||
/**
|
||||
* Test getRepoLogs method.
|
||||
*
|
||||
* @param int $version
|
||||
* @access public
|
||||
* @return object|bool|null
|
||||
*/
|
||||
public function getRepoLogsTest(int $version): object|bool|null
|
||||
{
|
||||
$this->objectModel->setRepos();
|
||||
ob_start();
|
||||
|
||||
Reference in New Issue
Block a user