/** * @dataProvider VCSRepoNameDP */ public function testVCSRepoName($a, $b) { $obj = new _VersionControl(); $this->string($obj->VCSRepoName($a))->isEqualTo($b); }
use Cache\Cache; use VCS\Git; use VCS\Mercurial; use VCS\Subversion; foreach (Project::getRepositories() as $repo) { // Get the right locale for this repo $locale = Project::getLocaleInContext($page_locale, $repo); // We don't care about en-US if ($locale == 'en-US') { continue; } if (in_array($locale, Project::getRepositoryLocales($repo))) { $ref_locale = Project::getReferenceLocale($repo); // Get VCS data $repo_vcs = VersionControl::VCSRepoName($repo); $repo_path = $repo_vcs . '/' . $locale; switch (VersionControl::getVCS($repo)) { case 'hg': $vcs = new Mercurial(HG . $repo_path); break; case 'svn': $vcs = new Subversion(SVN . $repo_path); break; case 'git': $vcs = new Git(GIT . $repo_path); break; } // Extract, cache and store VCS data $cache_id = $repo_vcs . $locale . 'healthstatus2'; if (!($stats = Cache::getKey($cache_id))) {