Skip to content

Commit

Permalink
jhedstrom#479: Fix CS violations.
Browse files Browse the repository at this point in the history
  • Loading branch information
marcoscano committed Mar 22, 2018
1 parent 4877eb4 commit f73f065
Showing 1 changed file with 13 additions and 14 deletions.
27 changes: 13 additions & 14 deletions src/Drupal/DrupalExtension/Context/MinkContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ public function afterJavascriptStep($event)
*
* @Given I wait for AJAX to finish
*/
public function iWaitForAjaxToFinish($event = NULL)
public function iWaitForAjaxToFinish($event = null)
{
$condition = <<<JS
(function() {
Expand All @@ -149,19 +149,18 @@ function isAjaxing(instance) {
JS;
$result = $this->getSession()->wait(1000 * $this->getMinkParameter('ajax_timeout'), $condition);
if (!$result) {
if ($event) {
/** @var \Behat\Behat\Hook\Scope\BeforeStepScope $event */
$event_data = ' ' . json_encode([
'name' => $event->getName(),
'feature' => $event->getFeature()->getTitle(),
'step' => $event->getStep()->getText(),
'suite' => $event->getSuite()->getName(),
]);
}
else {
$event_data = '';
}
throw new \RuntimeException('Unable to complete AJAX request.' . $event_data);
if ($event) {
/** @var \Behat\Behat\Hook\Scope\BeforeStepScope $event */
$event_data = ' ' . json_encode([
'name' => $event->getName(),
'feature' => $event->getFeature()->getTitle(),
'step' => $event->getStep()->getText(),
'suite' => $event->getSuite()->getName(),
]);
} else {
$event_data = '';
}
throw new \RuntimeException('Unable to complete AJAX request.' . $event_data);
}
}
/**
Expand Down

0 comments on commit f73f065

Please sign in to comment.