You are here

function Faq_AskTestCase::turnBlockOn in FAQ_Ask 7

3 calls to Faq_AskTestCase::turnBlockOn()
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
Faq_AskTestCase::setUp in ./faq_ask.test
Implementation of setUp(). Array of additional modules to be installed are passed as parameter

File

./faq_ask.test, line 110
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 turnBlockOn($module, $blockname, $region = 'sidebar_second') {
  $block = array();
  $block['module'] = $module;
  $block['delta'] = $blockname;

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