function BulkFormTest::testBulkFormCombineFilter

Same name and namespace in other branches
  1. 8.9.x core/modules/user/tests/src/Functional/Views/BulkFormTest.php \Drupal\Tests\user\Functional\Views\BulkFormTest::testBulkFormCombineFilter()
  2. 10 core/modules/user/tests/src/Functional/Views/BulkFormTest.php \Drupal\Tests\user\Functional\Views\BulkFormTest::testBulkFormCombineFilter()
  3. 11.x core/modules/user/tests/src/Functional/Views/BulkFormTest.php \Drupal\Tests\user\Functional\Views\BulkFormTest::testBulkFormCombineFilter()

Tests the user bulk form with a combined field filter on the bulk column.

File

core/modules/user/tests/src/Functional/Views/BulkFormTest.php, line 143

Class

BulkFormTest
Tests a user bulk form.

Namespace

Drupal\Tests\user\Functional\Views

Code

public function testBulkFormCombineFilter() {
    // Add a user.
    User::load($this->users[0]
        ->id());
    $view = Views::getView('test_user_bulk_form_combine_filter');
    $errors = $view->validate();
    $this->assertEquals(t('Field %field set in %filter is not usable for this filter type. Combined field filter only works for simple fields.', [
        '%field' => 'User: Bulk update',
        '%filter' => 'Global: Combine fields filter',
    ]), reset($errors['default']));
}

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