public function RngViewsTest::testRegisterLinkNoAccess in RNG - Events and Registrations 8
Same name and namespace in other branches
- 8.2 tests/src/Kernel/Views/RngViewsTest.php \Drupal\Tests\rng\Kernel\Views\RngViewsTest::testRegisterLinkNoAccess()
- 3.x tests/src/Kernel/Views/RngViewsTest.php \Drupal\Tests\rng\Kernel\Views\RngViewsTest::testRegisterLinkNoAccess()
Test register link field with no access produces empty field.
File
- tests/
src/ Kernel/ Views/ RngViewsTest.php, line 143
Class
- RngViewsTest
- Tests RNG field plugins.
Namespace
Drupal\Tests\rng\Kernel\ViewsCode
public function testRegisterLinkNoAccess() {
$this
->createEvent();
$user1 = $this
->drupalCreateUser([
'rng register self',
]);
$this
->setCurrentUser($user1);
$this
->createUserRoleRules([], []);
$this->view->displayHandlers
->get('default')
->overrideOption('fields', [
'rng_event_register' => [
'table' => 'entity_test',
'field' => 'rng_event_register',
'id' => 'rng_event_register',
'plugin_id' => 'rng_event_register',
'entity_type' => 'entity_test',
],
]);
$this->view
->save();
$this->view
->preview();
$expected = '';
$actual = $this->view->style_plugin
->getField(0, 'rng_event_register');
$this
->assertEquals($expected, $actual);
}