public function NodeViewCountBaseFunctionalityTest::testNodesWithTeaserViewMode in Node view count 8
Tests nodeviewcount settings for nodes in teaser view mode.
File
- src/
Tests/ NodeViewCountBaseFunctionalityTest.php, line 64
Class
- NodeViewCountBaseFunctionalityTest
- Tests the base functionality of nodeviewcount module.
Namespace
Drupal\nodeviewcount\TestsCode
public function testNodesWithTeaserViewMode() {
$this
->checkTeaserViewMode('anonymous', TRUE);
$this
->checkTeaserViewMode('logged', TRUE);
$this
->checkTeaserViewMode('administrator', FALSE);
$this
->drupalLogin($this->adminUser);
$edit['view_modes[teaser]'] = FALSE;
$this
->drupalPostForm('admin/config/content/nodeviewcount', $edit, $this
->t('Save configuration'));
$this
->drupalGet('admin/config/content/nodeviewcount');
$this
->drupalLogout();
$this
->checkTeaserViewMode('anonymous', FALSE);
$this
->checkTeaserViewMode('logged', FALSE);
$this
->checkTeaserViewMode('administrator', FALSE);
}