You are here

final class Helpers in Lightning Workflow 8.2

Contains miscellaneous helpful step definitions.

@todo Find a way to override the Drupal Extension's "I run cron" step, then remove this context.

Hierarchy

  • class \Acquia\LightningExtension\Context\Helpers extends \Drupal\DrupalExtension\Context\DrupalSubContextBase

Expanded class hierarchy of Helpers

File

modules/lightning_scheduler/tests/contexts/Helpers.behat.inc, line 14

Namespace

Acquia\LightningExtension\Context
View source
final class Helpers extends DrupalSubContextBase {

  /**
   * Runs cron by invoking the /cron URL.
   *
   * @When I run cron over HTTP
   */
  public function cron() {
    $url = Url::fromRoute('system.cron', [
      'key' => \Drupal::state()
        ->get('system.cron_key'),
    ]);
    $url = $url
      ->toString();
    $url = $this
      ->locatePath($url);
    \Drupal::httpClient()
      ->get($url);
  }

}

Members

Namesort descending Modifiers Type Description Overrides
Helpers::cron public function Runs cron by invoking the /cron URL.