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