diff --git a/core/modules/system/lib/Drupal/system/Tests/Common/TableSortExtenderUnitTest.php b/core/modules/system/lib/Drupal/system/Tests/Common/TableSortExtenderUnitTest.php index e42c4c6..241949f 100644 --- a/core/modules/system/lib/Drupal/system/Tests/Common/TableSortExtenderUnitTest.php +++ b/core/modules/system/lib/Drupal/system/Tests/Common/TableSortExtenderUnitTest.php @@ -70,8 +70,7 @@ function testTableSortInit() { // Test with simple table headers plus $_GET parameters that should _not_ // override the default. $request = Request::createFromGlobals(); - $request->query->replace(array()); - $request->query->add(array( + $request->query->replace(array( // This should not override the table order because only complex // headers are overridable. 'order' => 'bar', @@ -84,8 +83,7 @@ function testTableSortInit() { // Test with simple table headers plus $_GET parameters that _should_ // override the default. $request = Request::createFromGlobals(); - $request->query->replace(array()); - $request->query->add(array( + $request->query->replace(array( 'sort' => 'DESC', // Add an unrelated parameter to ensure that tablesort will include // it in the links that it creates. @@ -116,8 +114,7 @@ function testTableSortInit() { ); // Reset $_GET from previous assertion. $request = Request::createFromGlobals(); - $request->query->replace(array()); - $request->query->add(array( + $request->query->replace(array( 'order' => '2', )); \Drupal::getContainer()->set('request', $request); @@ -134,8 +131,7 @@ function testTableSortInit() { // Test complex table headers plus $_GET parameters that should _not_ // override the default. $request = Request::createFromGlobals(); - $request->query->replace(array()); - $request->query->add(array( + $request->query->replace(array( // This should not override the table order because this header does not // exist. 'order' => 'bar', @@ -154,8 +150,7 @@ function testTableSortInit() { // Test complex table headers plus $_GET parameters that _should_ // override the default. $request = Request::createFromGlobals(); - $request->query->replace(array()); - $request->query->add(array( + $request->query->replace(array( 'order' => '1', 'sort' => 'ASC', // Add an unrelated parameter to ensure that tablesort will include diff --git a/core/modules/system/lib/Drupal/system/Tests/Database/SelectPagerDefaultTest.php b/core/modules/system/lib/Drupal/system/Tests/Database/SelectPagerDefaultTest.php index bbd253a..79c93d2 100644 --- a/core/modules/system/lib/Drupal/system/Tests/Database/SelectPagerDefaultTest.php +++ b/core/modules/system/lib/Drupal/system/Tests/Database/SelectPagerDefaultTest.php @@ -138,8 +138,7 @@ function testHavingPagerQuery() { function testElementNumbers() { $request = Request::createFromGlobals(); - $request->query->replace(array()); - $request->query->add(array( + $request->query->replace(array( 'page' => '3, 2, 1, 0', )); \Drupal::getContainer()->set('request', $request); diff --git a/core/modules/system/lib/Drupal/system/Tests/Entity/EntityQueryTest.php b/core/modules/system/lib/Drupal/system/Tests/Entity/EntityQueryTest.php index 771d5d8..9256faa 100644 --- a/core/modules/system/lib/Drupal/system/Tests/Entity/EntityQueryTest.php +++ b/core/modules/system/lib/Drupal/system/Tests/Entity/EntityQueryTest.php @@ -349,8 +349,7 @@ function testSort() { // Test the pager by setting element #1 to page 2 with a page size of 4. // Results will be #8-12 from above. $request = Request::createFromGlobals(); - $request->query->replace(array()); - $request->query->add(array( + $request->query->replace(array( 'page' => '0,2', )); \Drupal::getContainer()->set('request', $request); @@ -381,8 +380,7 @@ protected function testTableSort() { // assert that all entities from one bundle are after the other as the // order dictates. $request = Request::createFromGlobals(); - $request->query->replace(array()); - $request->query->add(array( + $request->query->replace(array( 'sort' => 'asc', 'order' => 'Type', ));