You are here

public function BlockAttributesUpdateDisplayTestCase::testUpdateDisplayAttributes in Block Attributes 7

Update and display a Block multiple times to ensure attributes are found.

A Block is updated and displayed several times and with logged in or anonymous user, with Block cache enabled or disabled.

File

./block_attributes.test, line 235
Test the Block Attributes module.

Class

BlockAttributesUpdateDisplayTestCase
Test the update and display of the HTML attributes for a Block.

Code

public function testUpdateDisplayAttributes() {

  // Edit the block, change attributes and check if they are found.
  $this
    ->assertUpdateDisplayBlockAttributes();

  // Now, turn on caching programmatically and set it to 15 min expiry.
  variable_set('block_cache', TRUE);
  variable_set('cache_lifetime', 900);
  variable_set('page_cache_maximum_age', 900);

  // Edit the block, change attributes and check with the anonymous user.
  $this
    ->assertUpdateDisplayBlockAttributes(TRUE);

  // Edit the block, change attributes and check with the anonymous user.
  $this
    ->assertUpdateDisplayBlockAttributes(TRUE);
}