You are here

function CacheActionsMiniPanelsTestCase::testClearPanelPanes in Cache Actions 7

Same name and namespace in other branches
  1. 6.2 cache_actions.test \CacheActionsMiniPanelsTestCase::testClearPanelPanes()
  2. 7.2 cache_actions.test \CacheActionsMiniPanelsTestCase::testClearPanelPanes()

Test clearing of Mini Panel Panes.

File

./cache_actions.test, line 235
This file contains the tests for Cache Actions. All tests depend on the panels, views and rules that are defined by the cache actions test module.

Class

CacheActionsMiniPanelsTestCase
Tests for clearing panels.

Code

function testClearPanelPanes() {

  // Needed in order to register the default panels.
  drupal_flush_all_caches();

  // Create a node.
  $node = $this
    ->drupalCreateNode();

  // Let's go to a panel, in order to make it cached.
  $html = $this
    ->drupalGet('cache-actions-test-mini-panel-pane-wrapper');

  // We should be able to see the title
  $this
    ->assertText($node->title);

  // Alter the title.
  $node->title = "Altered title";
  node_save($node);

  // The title should be correct in the first panel.
  $html = $this
    ->drupalGet('cache-actions-test-mini-panel-pane-wrapper');

  // We should be able to see the title
  $this
    ->assertText($node->title);
}