You are here

function AdvancedQueueCronTestCase::testAdminOption in Advanced Queue 7

Test admin page options.

File

tests/advancedqueue.test, line 79

Class

AdvancedQueueCronTestCase
Check cron functionality.

Code

function testAdminOption() {
  $this
    ->drupalLogin($this->admin_user);
  $this
    ->drupalGet('admin/config/system/cron');
  $this
    ->assertField('edit-advancedqueue-use-cron', t('Advancedqueue use cron option.'));
  $this
    ->assertNoFieldChecked('edit-advancedqueue-use-cron', t('Advancedqueue use cron option default unchecked.'));
  $edit = array(
    'advancedqueue_use_cron' => TRUE,
  );
  $this
    ->drupalPost(NULL, $edit, t('Save configuration'));
  $this
    ->assertFieldChecked('edit-advancedqueue-use-cron', t('Advancedqueue cron enabled successfully.'));
  $this
    ->drupalLogout();
}