Commit 99cd5a6d authored by alexpott's avatar alexpott

Issue #2512580 by Wim Leers: NodeEntityViewModeAlterTest uses State to...

Issue #2512580 by Wim Leers: NodeEntityViewModeAlterTest uses State to dynamically affect hook_entity_view_mode_alter()
parent 233c9ea5
......@@ -7,6 +7,8 @@
namespace Drupal\node\Tests;
use Drupal\Core\Cache\Cache;
/**
* Tests changing view modes for nodes.
*
......@@ -37,6 +39,7 @@ function testNodeViewModeChange() {
// Set the flag to alter the view mode and view the node.
\Drupal::state()->set('node_test_change_view_mode', 'teaser');
Cache::invalidateTags(['rendered']);
$this->drupalGet('node/' . $node->id());
// Check that teaser mode is viewed.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment