当前位置: 首页>>代码示例>>PHP>>正文


PHP BeforeScenarioScope::getFeature方法代码示例

本文整理汇总了PHP中Behat\Behat\Hook\Scope\BeforeScenarioScope::getFeature方法的典型用法代码示例。如果您正苦于以下问题:PHP BeforeScenarioScope::getFeature方法的具体用法?PHP BeforeScenarioScope::getFeature怎么用?PHP BeforeScenarioScope::getFeature使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Behat\Behat\Hook\Scope\BeforeScenarioScope的用法示例。


在下文中一共展示了BeforeScenarioScope::getFeature方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: beforeScenario

 /**
  *
  * @BeforeScenario
  *
  * @param BeforeScenarioScope $scope
  */
 public function beforeScenario(BeforeScenarioScope $scope)
 {
     $this->scenarioData = ['file' => $scope->getFeature()->getFile(), 'line' => $scope->getScenario()->getLine(), 'title' => $scope->getScenario()->getTitle(), 'tags' => $scope->getScenario()->getTags()];
     $this->_w3c = $scope->getEnvironment()->getContext(W3CValidationContext::class);
     $this->_screenshot = $scope->getEnvironment()->getContext(ScreenshotContext::class);
     $this->setLogPath();
 }
开发者ID:edmondscommerce,项目名称:behat-error-detection-context,代码行数:13,代码来源:ErrorDetectionContext.php

示例2: prepareParameters

 /**
  * @BeforeScenario
  *
  * Enable the testing app before the first scenario of the feature and
  * reset the configs before each scenario
  * @param BeforeScenarioScope $event
  */
 public function prepareParameters(BeforeScenarioScope $event)
 {
     $user = $this->currentUser;
     $this->currentUser = 'admin';
     $scenarios = $event->getFeature()->getScenarios();
     if ($event->getScenario() === reset($scenarios)) {
         $this->setStatusTestingApp(true);
     }
     $this->resetAppConfigs();
     $this->currentUser = $user;
 }
开发者ID:rchicoli,项目名称:owncloud-core,代码行数:18,代码来源:AppConfiguration.php

示例3: beforeScenario

 /**
  * @param BeforeScenarioScope $scope
  *
  * @BeforeScenario
  */
 public function beforeScenario(BeforeScenarioScope $scope)
 {
     $this->tags += array_merge($scope->getFeature()->getTags(), $scope->getScenario()->getTags());
     // Any page should be visited due to using jQuery and checking the cookies.
     $this->getSession()->visit($this->locatePath('/'));
 }
开发者ID:spheresh,项目名称:behat-drupal-propeople-context,代码行数:11,代码来源:PropeopleContext.php

示例4: getCoverageKeyFromScope

 private function getCoverageKeyFromScope(BeforeScenarioScope $scope)
 {
     $name = $scope->getFeature()->getTitle() . '::' . $scope->getScenario()->getTitle();
     return $name;
 }
开发者ID:victoire,项目名称:victoire,代码行数:5,代码来源:CoverageContext.php

示例5: beforeScenario

 /**
  * @param Scope\BeforeScenarioScope $scope
  *
  * @BeforeScenario
  */
 public function beforeScenario(Scope\BeforeScenarioScope $scope)
 {
     foreach (array_merge($scope->getFeature()->getTags(), $scope->getScenario()->getTags()) as $tag) {
         $values = explode(':', $tag);
         $value = '';
         if (count($values) > 1) {
             list($tag, $value) = $values;
         }
         self::$tags[strtolower($tag)] = $value;
     }
     // Any page should be visited due to using jQuery and checking the cookies.
     $this->visitPath('/');
     // By "Goutte" session we need to visit any page to be able to set a cookie
     // for this session and use it for checking request status codes.
     $this->visitPath('/', 'goutte');
 }
开发者ID:arrrtem,项目名称:TqExtension,代码行数:21,代码来源:TqContext.php

示例6: startCoverage

 /**
  * @BeforeScenario
  */
 public function startCoverage(BeforeScenarioScope $scope)
 {
     self::$coverage->start("{$scope->getFeature()->getTitle()}::{$scope->getScenario()->getTitle()}");
 }
开发者ID:api-platform,项目名称:core,代码行数:7,代码来源:CoverageContext.php

示例7: getCoverageKeyFromScope

 private function getCoverageKeyFromScope(BeforeScenarioScope $scope) : string
 {
     return sprintf('%s::%s', $scope->getFeature()->getTitle(), $scope->getScenario()->getTitle());
 }
开发者ID:soyuka,项目名称:core,代码行数:4,代码来源:CoverageContext.php


注:本文中的Behat\Behat\Hook\Scope\BeforeScenarioScope::getFeature方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。