You are here

function simpletest_trigger_error in SimpleTest 6

1 call to simpletest_trigger_error()
simpletest_overview_form_submit in ./simpletest.module
FAPI form submit for simpletest_overview_form

File

./simpletest.module, line 409

Code

function simpletest_trigger_error($type) {
  switch ($type) {
    case 'not available':
      $output = t('The simpletest framework cannot be found in the current installation. Please note that simpletest.module needs Simpletest framework to be installed. ');
      $output .= t('Please download it from !simpletest_link and place it into the same directory as simpletest.module: %simpletest_directory', array(
        '!simpletest_link' => l('Simpletest on SourceForge', 'https://sourceforge.net/project/showfiles.php?group_id=76550'),
        '%simpletest_directory' => SIMPLE_TEST,
      ));
      drupal_set_message($output, 'error');
      break;
    case 'stale version':
      $output = t('Due to a lot of refactoring done on simpletest library side. Simpletest module is not compatible with Simpletest versions lower than 1.0.1 beta2. ');
      $output .= t('Please download the latest version from !simpletest_link and place it into the same directory as simpletest.module: %simpletest_directory', array(
        '!simpletest_link' => l('Simpletest on SourceForge', 'https://sourceforge.net/project/showfiles.php?group_id=76550'),
        '%simpletest_directory' => SIMPLE_TEST,
      ));
      drupal_set_message($output, 'error');
      break;
    case 'no tests selected':
      drupal_set_message(t('No test has been selected.'), 'error');
  }
  return false;
}