function NodeRequirementsStatusFilterWarningTest::testDescriptionWithSingleViewAndSingleModule

Tests description with one view and one access module.

File

core/modules/node/tests/src/Kernel/NodeRequirementsStatusFilterWarningTest.php, line 131

Class

NodeRequirementsStatusFilterWarningTest
Tests redundant status filter warnings raised by node_requirements().

Namespace

Drupal\Tests\node\Kernel

Code

public function testDescriptionWithSingleViewAndSingleModule() : void {
  $this->enableNodeAccessTestModule();
  $this->createTestView('test_view', 'Test View', TRUE, [
    'status' => $this->getStatusFilterConfig(),
  ]);
  $requirements = $this->getRequirements();
  $this->assertEquals('The <em class="placeholder">Test View (Default)</em> view uses 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.', $this->renderStatusFilterDescription($requirements));
}

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