Tests determing changes in hook_block_presave().
Verifies the static block load cache is cleared upon save.
public function testDeterminingChanges() {
// Initial creation.
$block = $this
->createCustomBlock('test_changes');
// Update the block without applying changes.
$block
->save();
$this
->assertEqual($block
->label(), 'test_changes', 'No changes have been determined.');
// Apply changes.
$block->info->value = 'updated';
$block
->save();
// The hook implementations custom_block_test_custom_block_presave() and
// custom_block_test_custom_block_update() determine changes and change the
// title.
$this
->assertEqual($block
->label(), 'updated_presave_update', 'Changes have been determined.');
// Test the static block load cache to be cleared.
$block = custom_block_load($block->id->value);
$this
->assertEqual($block
->label(), 'updated_presave', 'Static cache has been cleared.');
}