/**
  * Tests repository getter
  *
  * @param HgWrapper $wrapper
  * @depends testConstructor
  */
 public function testRepository(HgWrapper $wrapper)
 {
     $cmd = $this->variables['availCmd'];
     $repoPath = $this->variables['availRepository'];
     $wrapper->setCmd($cmd);
     $repository = $wrapper->getRepository($repoPath);
     $this->assertInstanceOf(Repository::className(), $repository);
 }
 /**
  * Tests get repository object
  *
  * @depends testUpdateProject
  *
  * @return Project
  */
 public function testGetRepository()
 {
     $project = $this->getModule('Yii2')->grabFixture('projects', 'gitProject');
     // change repo path to HG first
     $project->repo_path = Yii::$app->params['testingVariables']['hgProjectPath'];
     $project->repo_type = Project::REPO_HG;
     $this->assertInstanceOf(HgRepository::className(), $project->getRepositoryObject(), 'Check get HG repository object');
     // change repo path to GIT
     $project->repo_path = Yii::$app->params['testingVariables']['gitProjectPath'];
     $project->repo_type = Project::REPO_GIT;
     $this->assertInstanceOf(GitRepository::className(), $project->getRepositoryObject(), 'Check get GIT repository object');
     return $project;
 }