You are here

private function CommentFullViewFiltersFieldsTest::assertOrder in Translation Views 8

Set column sorting and order.

Parameters

string $orderColumn: Machine name of the column to be sorted.

string $sort: Sorting order (asc or desc).

array $default_params: Langcode and Translation target language.

Throws

\Behat\Mink\Exception\ExpectationException

1 call to CommentFullViewFiltersFieldsTest::assertOrder()
CommentFullViewFiltersFieldsTest::testSorting in tests/src/Functional/CommentFullViewFiltersFieldsTest.php
Tests columns' sorting.

File

tests/src/Functional/CommentFullViewFiltersFieldsTest.php, line 113

Class

CommentFullViewFiltersFieldsTest
Tests for fields, filters and sorting for comment entity.

Namespace

Drupal\Tests\translation_views\Functional

Code

private function assertOrder($orderColumn, $sort, array $default_params = []) {
  $this
    ->drupalGet($this->viewPath, [
    'query' => [
      'langcode' => $default_params[0],
      'translation_target_language' => $default_params[1],
      'translation_outdated' => 'All',
      'translation_status' => 'All',
      'order' => $orderColumn,
      'sort' => $sort,
    ],
  ]);
  $this
    ->assertSession()
    ->statusCodeEquals(200);
}