function NodeRequirementsStatusFilterWarningTest::testDescriptionWithMultipleViewsAndSingleModule
Tests description with multiple views and one access module.
File
-
core/
modules/ node/ tests/ src/ Kernel/ NodeRequirementsStatusFilterWarningTest.php, line 147
Class
- NodeRequirementsStatusFilterWarningTest
- Tests redundant status filter warnings raised by node_requirements().
Namespace
Drupal\Tests\node\KernelCode
public function testDescriptionWithMultipleViewsAndSingleModule() : void {
$this->enableNodeAccessTestModule();
$this->createTestView('test_view_1', 'Test View 1', TRUE, [
'status' => $this->getStatusFilterConfig(),
]);
$this->createTestView('test_view_2', 'Test View 2', TRUE, [
'status' => $this->getStatusFilterConfig(),
]);
$requirements = $this->getRequirements();
self::assertEquals('The following views use the <em class="placeholder">Published status or admin user</em> filter but it has no effect because the following module(s) control access: <em class="placeholder">Node module access tests</em>. Review and consider removing the filter from these views: <ul><li>Test View 1 (Default)</li><li>Test View 2 (Default)</li></ul>', $this->renderStatusFilterDescription($requirements));
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.