Skip to content
Snippets Groups Projects
Commit ec438eb4 authored by Alex Pott's avatar Alex Pott
Browse files

Issue #2501635 by olli, Lendude: Fix QueryParameterTest

parent 84214e86
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
...@@ -48,41 +48,33 @@ public function testGetArgument($options, Request $request, $expected) { ...@@ -48,41 +48,33 @@ public function testGetArgument($options, Request $request, $expected) {
* - third entry: the expected default argument value. * - third entry: the expected default argument value.
*/ */
public function providerGetArgument() { public function providerGetArgument() {
$data = array(); $data = [];
$single[] = array( $data[] = [
'query_param' => 'test', ['query_param' => 'test'],
); new Request(['test' => 'data']),
$single[] = new Request(array('test' => 'data')); 'data',
$single[] = 'data'; ];
$data[] = $single;
$single[] = array( $data[] = [
'query_param' => 'test', ['query_param' => 'test', 'multiple' => 'and'],
'multiple' => 'AND' new Request(['test' => ['data1', 'data2']]),
); 'data1,data2',
$single[] = new Request(array('test' => array('data1', 'data2'))); ];
$single[] = 'data1+data2';
$data[] = $single;
$single[] = array( $data[] = [
'query_param' => 'test', ['query_param' => 'test', 'multiple' => 'or'],
'multiple' => 'OR' new Request(['test' => ['data1', 'data2']]),
); 'data1+data2',
$single[] = new Request(array('test' => array('data1', 'data2'))); ];
$single[] = 'data1,data2';
$data[] = $single;
$single[] = array( $data[] = [
'query_param' => 'test', ['query_param' => 'test', 'fallback' => 'blub'],
'fallback' => 'blub', new Request([]),
); 'blub',
$single[] = new Request(array()); ];
$single[] = 'blub';
$data[] = $single;
return $data; return $data;
} }
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment