Index: modules/simpletest/simpletest.test =================================================================== RCS file: /cvs/drupal/drupal/modules/simpletest/simpletest.test,v retrieving revision 1.5 diff -u -r1.5 simpletest.test --- modules/simpletest/simpletest.test 13 Aug 2008 06:42:04 -0000 1.5 +++ modules/simpletest/simpletest.test 19 Aug 2008 01:39:51 -0000 @@ -78,7 +78,7 @@ // Run twice so test_ids can be accumulated. for ($i = 0; $i < 2; $i++) { // Run this test from web interface. - $this->drupalGet('admin/build/testing'); + $this->drupalGet('admin/development/testing'); $edit = array(); $edit['SimpleTestTestCase'] = TRUE; Index: modules/simpletest/simpletest.module =================================================================== RCS file: /cvs/drupal/drupal/modules/simpletest/simpletest.module,v retrieving revision 1.10 diff -u -r1.10 simpletest.module --- modules/simpletest/simpletest.module 13 Aug 2008 06:42:04 -0000 1.10 +++ modules/simpletest/simpletest.module 19 Aug 2008 01:39:51 -0000 @@ -8,7 +8,7 @@ switch ($path) { case 'admin/help#simpletest': $output = '

' . 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.') .'

'; - $output .= '

' . t('Visit Administer >> Site building >> SimpleTest to display a list of available tests. For comprehensive testing, select all 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/build/testing'))) .'

'; + $output .= '

' . t('Visit Administer >> Site building >> SimpleTest to display a list of available tests. For comprehensive testing, select all 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'))) .'

'; $output .= '

' . 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.') .'

'; $output .= '

' . t('For more information on creating and modifying your own tests, see the SimpleTest API Documentation in the Drupal handbook.', array('@simpletest-api' => 'http://drupal.org/simpletest')) .'

'; $output .= '

' . t('For more information, see the online handbook entry for SimpleTest module.', array('@simpletest' => 'http://drupal.org/handbook/modules/simpletest')) .'

'; @@ -20,7 +20,7 @@ * Implementation of hook_menu(). */ function simpletest_menu() { - $items['admin/build/testing'] = array( + $items['admin/development/testing'] = array( 'title' => 'Testing', 'page callback' => 'drupal_get_form', 'page arguments' => array('simpletest_test_form'), @@ -322,7 +322,7 @@ array('_simpletest_batch_operation', array($test_list, $test_id)), ), 'finished' => '_simpletest_batch_finished', - 'redirect' => 'admin/build/testing', + 'redirect' => 'admin/development/testing', 'progress_message' => t('Processing tests.'), 'css' => array(drupal_get_path('module', 'simpletest') .'/simpletest.css'), 'init_message' => t('SimpleTest is initializing...') . ' ' . format_plural(count($test_list), "one test case will run.", "@count test cases will run."), Index: modules/system/system.module =================================================================== RCS file: /cvs/drupal/drupal/modules/system/system.module,v retrieving revision 1.612 diff -u -r1.612 system.module --- modules/system/system.module 2 Aug 2008 19:01:02 -0000 1.612 +++ modules/system/system.module 19 Aug 2008 01:39:52 -0000 @@ -387,6 +387,15 @@ 'page callback' => 'system_admin_menu_block_page', 'access arguments' => array('access administration pages'), ); + $items['admin/development'] = array( + 'title' => 'Development', + 'description' => 'Tools to help developers.', + 'position' => 'right', + 'weight' => -9, + 'page callback' => 'system_admin_menu_block_page', + 'access callback' => 'system_admin_menu_block_page_access', + 'access arguments' => array('admin/development', 'access administration pages') + ); $items['admin/settings/admin'] = array( 'title' => 'Administration theme', 'description' => 'Settings for how your administrative pages should look.', @@ -2116,3 +2125,30 @@ function system_image_toolkits() { return array('gd'); } + +/** + * Determine whether the menu item has children and the user has a given + * privilege. + * + * @param $path + * The path of the menu item to ensure has children. + * @param $string + * The permission, such as "administer nodes", being checked for. + * @return + * Boolean TRUE if the current user has the requested permission and the + * current menu item has children. + */ +function system_admin_menu_block_page_access($path, $string) { + if (user_access($string)) { + $count = db_result(db_query("SELECT COUNT(mlid) + FROM {menu_links} + WHERE plid = ( + SELECT mlid + FROM {menu_links} + WHERE link_path + LIKE '%s' + )", $path)); + return ($count > 0); + } + return FALSE; +} Index: scripts/run-tests.sh =================================================================== RCS file: /cvs/drupal/drupal/scripts/run-tests.sh,v retrieving revision 1.7 diff -u -r1.7 run-tests.sh --- scripts/run-tests.sh 18 Aug 2008 18:52:31 -0000 1.7 +++ scripts/run-tests.sh 19 Aug 2008 01:39:52 -0000 @@ -132,7 +132,7 @@ [,[, ...]] One or more tests to be run. By default, these are interpreted - as the names of test groups as shown at ?q=admin/build/testing. + as the names of test groups as shown at ?q=admin/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