function CacheActionsMiniPanelsTestCase::testClearPanelVariants in Cache Actions 6.2
Same name and namespace in other branches
- 7.2 cache_actions.test \CacheActionsMiniPanelsTestCase::testClearPanelVariants()
- 7 cache_actions.test \CacheActionsMiniPanelsTestCase::testClearPanelVariants()
Test clearing Mini panel variants.
File
- ./
cache_actions.test, line 210 - 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 testClearPanelVariants() {
// 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-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-wrapper');
// We should be able to see the title
$this
->assertText($node->title);
}