function AjaxPageStateTest::providerHandle

Same name and namespace in other branches
  1. 11.x core/tests/Drupal/Tests/Core/StackMiddleware/AjaxPageStateTest.php \Drupal\Tests\Core\StackMiddleware\AjaxPageStateTest::providerHandle()

Provides data for testHandle().

File

core/tests/Drupal/Tests/Core/StackMiddleware/AjaxPageStateTest.php, line 63

Class

AjaxPageStateTest
Tests Drupal\Core\StackMiddleware\AjaxPageState.

Namespace

Drupal\Tests\Core\StackMiddleware

Code

public static function providerHandle() : array {
  $foo_bar = UrlHelper::compressQueryParameter('foo,bar');
  $foo_baz = UrlHelper::compressQueryParameter('foo,baz');
  $data = [];
  $data['only query'] = [
    $foo_bar,
    NULL,
    'foo,bar',
    NULL,
  ];
  $data['only request'] = [
    NULL,
    $foo_bar,
    NULL,
    'foo,bar',
  ];
  $data['matching'] = [
    $foo_bar,
    $foo_bar,
    'foo,bar',
    'foo,bar',
  ];
  $data['different'] = [
    $foo_baz,
    $foo_bar,
    'foo,bar,baz',
    'foo,bar,baz',
  ];
  return $data;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.