protected function WebformSubmissionListBuilderCustomizeTest::assertTableHeaderSort in Webform 6.x
Same name and namespace in other branches
- 8.5 tests/src/Functional/WebformSubmissionListBuilderCustomizeTest.php \Drupal\Tests\webform\Functional\WebformSubmissionListBuilderCustomizeTest::assertTableHeaderSort()
Assert table header sorting.
Parameters
string $order: Column table is sorted by.
string $sort: Sort order for table column.
string|null $label: Column label.
1 call to WebformSubmissionListBuilderCustomizeTest::assertTableHeaderSort()
- WebformSubmissionListBuilderCustomizeTest::testCustomize in tests/
src/ Functional/ WebformSubmissionListBuilderCustomizeTest.php - Tests customize.
File
- tests/
src/ Functional/ WebformSubmissionListBuilderCustomizeTest.php, line 393
Class
- WebformSubmissionListBuilderCustomizeTest
- Tests for webform submission list builder.
Namespace
Drupal\Tests\webform\FunctionalCode
protected function assertTableHeaderSort($order, $sort = 'asc', $label = NULL) {
global $base_path;
$label = $label ?: $order;
// @todo Remove once Drupal 8.9.x is only supported.
if (floatval(\Drupal::VERSION) >= 8.9) {
$this
->assertRaw('<a href="' . $base_path . 'admin/structure/webform/manage/test_submissions/results/submissions?sort=' . $sort . '&order=' . str_replace(' ', '%20', $order) . '" title="sort by ' . $label . '" rel="nofollow">' . $label . '</a>');
}
else {
$this
->assertRaw('<a href="' . $base_path . 'admin/structure/webform/manage/test_submissions/results/submissions?sort=' . $sort . '&order=' . str_replace(' ', '%20', $order) . '" title="sort by ' . $label . '">' . $label . '</a>');
}
}