Example #1
0
 /**
  * @inheritdoc
  */
 public function __construct($name = null, array $data = array(), $dataName = '')
 {
     parent::__construct($name, $data, $dataName);
     $this->variables = Yii::$app->params['commit'];
     $wrapper = new HgWrapper();
     $repoPath = Yii::$app->params['wrapper']['availRepository'];
     $this->repository = $wrapper->getRepository($repoPath);
 }
 /**
  * Tests repository getter error
  *
  * @param HgWrapper $wrapper
  * @depends testConstructor
  * @expectedException VcsCommon\exception\CommonException
  */
 public function testRepositoryException(HgWrapper $wrapper)
 {
     $cmd = $this->variables['availCmd'];
     $repoPath = $this->variables['errorRepository'];
     $wrapper->setCmd($cmd);
     $wrapper->getRepository($repoPath);
 }