Commit 14f98f2b authored by Dries's avatar Dries

- Patch #546882 by Gabor Hojtsy: moving simpletest over to the new IA.

parent a3018c01
......@@ -13,7 +13,7 @@ function simpletest_help($path, $arg) {
switch ($path) {
case 'admin/help#simpletest':
$output = '<p>' . t('The SimpleTest module is a framework for running automated unit tests in Drupal. It can be used to verify a working state of Drupal before and after any code changes, or as a means for developers to write and execute tests for their modules.') . '</p>';
$output .= '<p>' . t('Visit <a href="@admin-simpletest">Administer >> Structure >> SimpleTest</a> to display a list of available tests. For comprehensive testing, select <em>all</em> tests, or individually select tests for more targeted testing. Note that it might take several minutes for all tests to complete.)', array('@admin-simpletest' => url('admin/development/testing'))) . '</p>';
$output .= '<p>' . t('Visit <a href="@admin-simpletest">Administer >> Structure >> SimpleTest</a> to display a list of available tests. For comprehensive testing, select <em>all</em> tests, or individually select tests for more targeted testing. Note that it might take several minutes for all tests to complete.)', array('@admin-simpletest' => url('admin/config/development/testing'))) . '</p>';
$output .= '<p>' . t('After the tests have run, a message will be displayed next to each test group indicating whether tests within it passed, failed, or had exceptions. A pass means that a test returned the expected results, while fail means that it did not. An exception normally indicates an error outside of the test, such as a PHP warning or notice. If there were fails or exceptions, the results are expanded, and the tests that had issues will be indicated in red or pink rows. Use these results to refine your code and tests until all tests return a pass.') . '</p>';
$output .= '<p>' . t('For more information on creating and modifying your own tests, see the <a href="@simpletest-api">SimpleTest API Documentation</a> in the Drupal handbook.', array('@simpletest-api' => 'http://drupal.org/simpletest')) . '</p>';
$output .= '<p>' . t('For more information, see the online handbook entry for <a href="@simpletest">SimpleTest module</a>.', array('@simpletest' => 'http://drupal.org/handbook/modules/simpletest')) . '</p>';
......@@ -25,28 +25,28 @@ function simpletest_help($path, $arg) {
* Implement hook_menu().
*/
function simpletest_menu() {
$items['admin/development/testing'] = array(
$items['admin/config/development/testing'] = array(
'title' => 'Testing',
'page callback' => 'drupal_get_form',
'page arguments' => array('simpletest_test_form'),
'description' => 'Run tests against Drupal core and your active modules. These tests help assure that your site code is working as designed.',
'access arguments' => array('administer unit tests'),
);
$items['admin/development/testing/list'] = array(
$items['admin/config/development/testing/list'] = array(
'title' => 'List',
'type' => MENU_DEFAULT_LOCAL_TASK,
);
$items['admin/development/testing/settings'] = array(
$items['admin/config/development/testing/settings'] = array(
'title' => 'Settings',
'page callback' => 'drupal_get_form',
'page arguments' => array('simpletest_settings_form'),
'access arguments' => array('administer unit tests'),
'type' => MENU_LOCAL_TASK,
);
$items['admin/development/testing/results/%'] = array(
$items['admin/config/development/testing/results/%'] = array(
'title' => 'Test result',
'page callback' => 'drupal_get_form',
'page arguments' => array('simpletest_result_form', 4),
'page arguments' => array('simpletest_result_form', 5),
'description' => 'View result of tests.',
'access arguments' => array('administer unit tests'),
'type' => MENU_CALLBACK,
......@@ -143,7 +143,7 @@ function simpletest_run_tests($test_list, $reporter = 'drupal') {
// By calling batch_process() directly, we skip that behavior and ensure
// that we don't exceed the size of data that can be sent to the database
// (max_allowed_packet on MySQL).
batch_process('admin/development/testing/results/' . $test_id);
batch_process('admin/config/development/testing/results/' . $test_id);
}
/**
......
......@@ -203,7 +203,7 @@ function simpletest_result_form(&$form_state, $test_id) {
$results = array();
if (is_numeric($test_id) && !$results = simpletest_result_get($test_id)) {
drupal_set_message(t('No test results to display.'), 'error');
drupal_goto('admin/development/testing');
drupal_goto('admin/config/development/testing');
return $form;
}
......@@ -281,7 +281,7 @@ function simpletest_result_form(&$form_state, $test_id) {
$form['result']['summary']['#ok'] = $form['result']['summary']['#fail'] + $form['result']['summary']['#exception'] == 0;
// Actions.
$form['#action'] = url('admin/development/testing/results/re-run');
$form['#action'] = url('admin/config/development/testing/results/re-run');
$form['action'] = array(
'#type' => 'fieldset',
'#title' => t('Actions'),
......@@ -316,7 +316,7 @@ function simpletest_result_form(&$form_state, $test_id) {
);
$form['action']['return'] = array(
'#markup' => l(t('Return to list'), 'admin/development/testing'),
'#markup' => l(t('Return to list'), 'admin/config/development/testing'),
);
if (is_numeric($test_id)) {
......@@ -344,7 +344,7 @@ function simpletest_result_form_submit($form, &$form_state) {
}
if (!$classes) {
$form_state['redirect'] = 'admin/development/testing';
$form_state['redirect'] = 'admin/config/development/testing';
return;
}
......@@ -425,7 +425,7 @@ function simpletest_settings_form(&$form_state) {
$form['general']['simpletest_clear_results'] = array(
'#type' => 'checkbox',
'#title' => t('Clear results after each complete test suite run'),
'#description' => t('By default SimpleTest will clear the results after they have been viewed on the results page, but in some cases it may be useful to leave the results in the database. The results can then be viewed at <em>admin/development/testing/[test_id]</em>. The test ID can be found in the database, simpletest table, or kept track of when viewing the results the first time. Additionally, some modules may provide more analaysis or features that require this setting to be disabled.'),
'#description' => t('By default SimpleTest will clear the results after they have been viewed on the results page, but in some cases it may be useful to leave the results in the database. The results can then be viewed at <em>admin/config/development/testing/[test_id]</em>. The test ID can be found in the database, simpletest table, or kept track of when viewing the results the first time. Additionally, some modules may provide more analaysis or features that require this setting to be disabled.'),
'#default_value' => variable_get('simpletest_clear_results', TRUE),
);
$form['general']['simpletest_verbose'] = array(
......
......@@ -84,7 +84,7 @@ class SimpleTestFunctionalTest extends DrupalWebTestCase {
// Run twice so test_ids can be accumulated.
for ($i = 0; $i < 2; $i++) {
// Run this test from web interface.
$this->drupalGet('admin/development/testing');
$this->drupalGet('admin/config/development/testing');
$edit = array();
$edit['SimpleTestFunctionalTest'] = TRUE;
......
......@@ -615,17 +615,6 @@ function system_menu() {
'type' => MENU_CALLBACK,
);
// Development menu category.
$items['admin/development'] = array(
'title' => 'Development',
'description' => 'Development tools.',
'position' => 'right',
'weight' => -7,
'page callback' => 'system_admin_menu_block_page',
'access callback' => 'system_admin_menu_block_access',
'access arguments' => array('admin/development', 'access administration pages'),
);
// Actions.
$items['admin/settings/actions'] = array(
'title' => 'Actions',
......
......@@ -141,7 +141,8 @@ function simpletest_script_help() {
<test1>[,<test2>[,<test3> ...]]
One or more tests to be run. By default, these are interpreted
as the names of test groups as shown at ?q=admin/development/testing.
as the names of test groups as shown at
?q=admin/config/development/testing.
These group names typically correspond to module names like "User"
or "Profile" or "System", but there is also a group "XML-RPC".
If --class is specified then these are interpreted as the names of
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment