public function BlockRefreshSettingsTestCase::testBlockRefreshConfigureForm in Block Refresh 7.2
File
- ./block_refresh.test, line 39
Class
- BlockRefreshSettingsTestCase
- Tests functionality of the block refresh module.
Code
public function testBlockRefreshConfigureForm() {
$configure_path = 'admin/structure/block/manage/block_refresh_demo/block_refresh_demo/configure';
$this
->drupalGet($configure_path);
$this
->assertText('Block refresh settings');
$this
->assertText('Enable block to be refreshed automatically');
$this
->assertFieldById('edit-block-refresh-auto');
$this
->assertText('Block refresh timer');
$this
->assertFieldById('edit-block-refresh-timer');
$this
->assertText('Enable block to be refreshed manually');
$this
->assertFieldById('edit-block-refresh-manual');
$this
->assertText('Enable block to be refreshed on page load');
$this
->assertFieldById('edit-block-refresh-init');
$this
->assertText('Send page path arguments to block');
$this
->assertFieldById('edit-block-refresh-arguments');
$this
->assertText('Enable block to be used in Panels');
$this
->assertFieldById('edit-block-refresh-panels');
$this
->assertText('Bypass Drupal page cache');
$this
->assertFieldById('edit-block-refresh-bypass-page-cache');
$this
->assertText('External cache max age');
$this
->assertFieldById('edit-block-refresh-bypass-external-cache');
$edit_auto = array(
'block_refresh_auto' => '0',
);
$this
->drupalPost($configure_path, $edit_auto, t('Save block'));
$settings = variable_get('block_refresh_settings');
}