You are here

function Faq_AskTestCase::turnBlockOff in FAQ_Ask 7

2 calls to Faq_AskTestCase::turnBlockOff()
BlockFaq_AskTestCase::testAskQuestionBlock in ./faq_ask.test
Ask a question via the block Does this: 1. Changes the block title on the ask a question block 2. Swithes it on 3. Posts a question via the block form using an asker user 4. Turns unanswered block off 5. Verifies question visibility to the answer…
CRAUDFaq_AskTestCase::testFaq_AskCreate in ./faq_ask.test
Test creating an unanswered FAQ and verify its status Also switches on notifcation of asker and verifies that anonymous are sent an e-mail by cron run

File

./faq_ask.test, line 123
Test Faq_Ask functionality Base test class. All tests inherits this one Hugely based on code from the test file block.test by boombatower

Class

Faq_AskTestCase
Base class that is extended by test cases

Code

function turnBlockOff($module, $blockname) {
  $block = array();
  $block['module'] = $module;
  $block['delta'] = $blockname;

  // Ask a Question Block
  $edit = array();
  $edit['blocks' . '[' . $block['module'] . '_' . $block['delta'] . '][region]'] = '-1';
  $this
    ->drupalPost('admin/structure/block', $edit, t('Save blocks'));
  $this
    ->assertText(t('The block settings have been updated.'), t('Block successfully move to disabled region.'));
}