You are here

protected function WebformCardsProgressJavaScriptTest::assertQuery in Webform 6.x

Same name and namespace in other branches
  1. 8.5 modules/webform_cards/tests/src/FunctionalJavaScript/WebformCardsProgressJavaScriptTest.php \Drupal\Tests\webform_cards\FunctionalJavaScript\WebformCardsProgressJavaScriptTest::assertQuery()

Passes if the query string on the current page is matched, fail otherwise.

Parameters

string $expected_query: The expected query string.

1 call to WebformCardsProgressJavaScriptTest::assertQuery()
WebformCardsProgressJavaScriptTest::testProgress in modules/webform_cards/tests/src/FunctionalJavaScript/WebformCardsProgressJavaScriptTest.php
Test webform cards progress.

File

modules/webform_cards/tests/src/FunctionalJavaScript/WebformCardsProgressJavaScriptTest.php, line 202

Class

WebformCardsProgressJavaScriptTest
Tests for webform cards progress.

Namespace

Drupal\Tests\webform_cards\FunctionalJavaScript

Code

protected function assertQuery($expected_query = '') {
  $actual_query = parse_url($this
    ->getSession()
    ->getCurrentUrl(), PHP_URL_QUERY) ?: '';
  $this
    ->assertEquals($expected_query, $actual_query);
}