コード例 #1
0
ファイル: CodeCoverage.php プロジェクト: pfz/codeception
 /**
  * @param RemoteInterface $module
  * @param $type
  *
  * @return bool|string
  */
 protected function getRemoteCoverageFile($module, $type)
 {
     $module->_setHeader('X-Codeception-CodeCoverage', 'remote-access');
     $contents = $module->_sendRequest($module->_getUrl() . '/c3/report/' . $type);
     if ($module->_getResponseCode() !== 200) {
         $this->getRemoteError($module);
     }
     return $contents;
 }
コード例 #2
0
 /**
  * @param RemoteInterface $module
  * @param $type
  *
  * @return bool|string
  */
 protected function getRemoteCoverageFile($module, $type)
 {
     $this->addHeader('X-Codeception-CodeCoverage', 'remote-access');
     $context = stream_context_create(array('http' => $this->http));
     $contents = file_get_contents($module->_getUrl() . '/c3/report/' . $type, false, $context);
     if ($contents === false) {
         $this->getRemoteError($http_response_header);
     }
     return $contents;
 }