function HandlerFilterUserNameTest::testUserNameApi
Same name in other branches
- 9 core/modules/user/tests/src/Functional/Views/HandlerFilterUserNameTest.php \Drupal\Tests\user\Functional\Views\HandlerFilterUserNameTest::testUserNameApi()
- 10 core/modules/user/tests/src/Functional/Views/HandlerFilterUserNameTest.php \Drupal\Tests\user\Functional\Views\HandlerFilterUserNameTest::testUserNameApi()
- 11.x core/modules/user/tests/src/Functional/Views/HandlerFilterUserNameTest.php \Drupal\Tests\user\Functional\Views\HandlerFilterUserNameTest::testUserNameApi()
Tests just using the filter.
File
-
core/
modules/ user/ tests/ src/ Functional/ Views/ HandlerFilterUserNameTest.php, line 77
Class
- HandlerFilterUserNameTest
- Tests the handler of the user: name filter.
Namespace
Drupal\Tests\user\Functional\ViewsCode
public function testUserNameApi() {
$view = Views::getView('test_user_name');
$view->initHandlers();
$view->filter['uid']->value = [
$this->accounts[0]
->id(),
];
$this->executeView($view);
$this->assertIdenticalResultset($view, [
[
'uid' => $this->accounts[0]
->id(),
],
], $this->columnMap);
$this->assertEqual($view->filter['uid']
->getValueOptions(), NULL);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.