Index: drupal_test_case.php
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/simpletest/drupal_test_case.php,v
retrieving revision 1.26
diff -u -p -r1.26 drupal_test_case.php
--- drupal_test_case.php	15 Oct 2006 04:28:59 -0000	1.26
+++ drupal_test_case.php	1 Jun 2007 13:12:20 -0000
@@ -121,7 +121,7 @@ class DrupalTestCase extends WebTestCase
       drupal_install_modules(array($name));
     }
     else {
-      module_enable($name);
+      module_enable(array($name));
     }
     module_list(TRUE, FALSE);
     if(module_exists($name)) {
Index: simpletest.info
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/simpletest/simpletest.info,v
retrieving revision 1.2
diff -u -p -r1.2 simpletest.info
--- simpletest.info	2 Sep 2006 18:56:57 -0000	1.2
+++ simpletest.info	1 Jun 2007 13:12:20 -0000
@@ -1,3 +1,5 @@
-; $Id: simpletest.info,v 1.2 2006/09/02 18:56:57 rokZlender Exp $
-name = Simpletest
-description = Allows to run unit tests on the Drupal codebase.
+; $Id $
+name = "SimpleTest module"
+description = "Provides simpletest classes to developers as well as some standard tests for Drupal"
+package = Simpletest
+version = "$Name$"
\ No newline at end of file
Index: simpletest.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/simpletest/simpletest.module,v
retrieving revision 1.21
diff -u -p -r1.21 simpletest.module
--- simpletest.module	25 Dec 2006 11:43:39 -0000	1.21
+++ simpletest.module	1 Jun 2007 13:12:21 -0000
@@ -1,5 +1,5 @@
 <?php
-// $Id: simpletest.module,v 1.21 2006/12/25 11:43:39 rokZlender Exp $
+// $Id: simpletest.module,v 1.15.2.1 2007/02/25 12:20:34 rokZlender Exp $
 
 /**
  * Implementation of hook_help().
@@ -101,40 +101,64 @@ function simpletest_entrypoint() {
      */
     return '&nbsp;';  
   }  
-  $op = $_POST['op'];
-  $edit = $_POST;
-  if (empty($op)) {
-		$op = arg(2);
+	$output = drupal_get_form('simpletest_overview_form');
+	
+	if (simpletest_running_output()) {
+	  print theme('page',  simpletest_running_output() . $output);
+	} else {
+	  print theme('page', $output);	
 	}
-	switch ($op) {
-		case t('Run All Tests'):
+}
+
+function simpletest_running_output($output = NULL) {
+  static $o;
+  if ($output != NULL) {
+    $o = $output;
+  }
+  return $o;
+}
+
+/**
+ * FAPI form submit for simpletest_overview_form
+ *
+ * @param $form_id 
+ * @param $form_values
+ */
+function simpletest_overview_form_submit($form_id, $form_values) {
+  
+  switch ($form_values['running_options']){
+    
+    case 'all_tests':
       $output  = simpletest_run_tests();
-  		break;
-		
-		case t('Run Selected Tests'):
-		  $tests_list = array();
-			foreach($edit as $test => $checked) {
-				if ($checked && ($test != 'form_id') && ($test != 'op') && ($test != 'form_token')) {
-					$tests_list[] = $test;
-				}
-			}
-			if (count($tests_list) > 0 ) {
-				$output = simpletest_run_tests($tests_list);  	 	 
+    break;    
+    
+    case 'selected_tests':
+      $test_list = array();
+      foreach ($form_values as $test => $checked){
+        if ($checked && ($test != 'running_options' && $test != 'op' && $test != 'form_token' && $test != 'form_id')) {
+          $tests_list[] = $test;
+        }
+      }
+      if (count($tests_list) > 0 ) {
+				$output = simpletest_run_tests($tests_list);
 			}
 			else { 
 				// no test has been selected
 				drupal_set_message(t('No test has been selected.'), 'error');
-				/** @FIXME!!! */
-//				$output = form_submit(t('Back to Menu'));
-//				$output = form($output);
 			}
-			break;
-		default:
-			$output = drupal_get_form('simpletest_overview_form');
+    break;  
+    
+    default:
+      drupal_set_message(t('No test has been selected.'), 'error');
   }
-	print theme('page', $output);	
+  
+  simpletest_running_output($output);
+  return false;
 }
 
+/**
+ * Create simpletest_overview_form 
+ */
 function simpletest_overview_form() {
   $output = array();
   $total_test = &simpletest_get_total_test();
@@ -154,13 +178,16 @@ function simpletest_overview_form() {
                     array('#type' => 'fieldset', '#collapsible' => TRUE, '#collapsed' => FALSE,
                           '#title' => $group_test->getLabel()));
   }
-  $submit[] = array('#type' => 'submit', '#value' => t('Run All Tests'));
-  $submit[] = array('#type' => 'submit', '#value' => t('Run Selected Tests'));
+  
+  $submit['running_options'] = array('#type' => 'radios', '#default_value' => 'selected_tests', 
+                    '#options' => array('all_tests' => t('Run all tests (WARNING, this may take a long time)'), 'selected_tests' => t('Run selected tests')));
+  $submit['op'] = array('#type' => 'submit', '#value' => t('Begin'));
   $output[] = array_merge($submit,
-                  array('#type' => 'fieldset', '#collapsible' => FALSE, '#collapsed' => FALSE, '#title' => 'Run tests', '#description' => t('WARNING, this may take a long time.')));
+                  array('#type' => 'fieldset', '#collapsible' => FALSE, '#collapsed' => FALSE, '#title' => 'Run tests'));
   return $output;
 }
 
+
 /**
  * Actually runs tests
  * @param array $testlist list of tests to run or DEFAULT NULL run all tests
Index: tests/image_module.test
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/simpletest/tests/image_module.test,v
retrieving revision 1.9
diff -u -p -r1.9 image_module.test
--- tests/image_module.test	15 Oct 2006 04:27:46 -0000	1.9
+++ tests/image_module.test	1 Jun 2007 13:12:21 -0000
@@ -89,7 +89,7 @@ class ImageModuleTest extends DrupalTest
     $this->drupalPostRequest('node/add/image', $edit, 'Submit');
     $content = $this->_browser->getContent();
     // test message
-    $this->assertWantedRaw(t('Your %post has been created.', array('%post' => 'image')), "Checking message");
+    $this->assertWantedRaw(t('Your %post has been created.', array('%post' => 'Image')), "Checking message");
     
     // get node nid
     $node = node_load(array('title' => $title));
Index: tests/page_creation.test
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/simpletest/tests/page_creation.test,v
retrieving revision 1.10
diff -u -p -r1.10 page_creation.test
--- tests/page_creation.test	15 Oct 2006 04:27:14 -0000	1.10
+++ tests/page_creation.test	1 Jun 2007 13:12:21 -0000
@@ -27,7 +27,7 @@ class PageCreationTest extends  DrupalTe
     $edit['body']     = '!SimpleTest test body! ' . $this->randomName(32) . ' ' . $this->randomName(32);
     $this->drupalPostRequest('node/add/page', $edit, 'Submit');
     
-    $this->assertWantedRaw(t('Your %post has been created.', array ('%post' => 'page')), 'Page created');
+    $this->assertWantedRaw(t('Your %post has been created.', array ('%post' => 'Page')), 'Page created');
     
     $node = node_load(array('title' => $edit['title']));
     $this->assertNotNull($node, 'Node found in database. %s');
Index: tests/profile_module.test
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/simpletest/tests/profile_module.test,v
retrieving revision 1.10
diff -u -p -r1.10 profile_module.test
--- tests/profile_module.test	2 Sep 2006 18:03:59 -0000	1.10
+++ tests/profile_module.test	1 Jun 2007 13:12:24 -0000
@@ -950,7 +950,7 @@ class ProfileModuleTest2 extends DrupalT
     $this->_browser->get(url("profile/". $form_name. "/$choice"));
     $title = str_replace("%value", $choice, $page_title);
 
-    $this->assertTitle($title. ' | '. variable_get('site_name', 'drupal'), "Checking title $title");
+    $this->assertTitle($title. ' | '. variable_get('site_name', 'Drupal'), "Checking title $title");
     $this->assertWantedText($title, "Checking $title in content");
     $delete_fields[] = $fid;
 
Index: tests/taxonomy.module.test
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/simpletest/tests/taxonomy.module.test,v
retrieving revision 1.6
diff -u -p -r1.6 taxonomy.module.test
--- tests/taxonomy.module.test	15 Oct 2006 04:26:44 -0000	1.6
+++ tests/taxonomy.module.test	1 Jun 2007 13:12:24 -0000
@@ -23,7 +23,8 @@ class TaxonomyVocabularyFunctions extend
     $maxNodes = rand(1, count($nodesList));
     $nodes = array();
     for($i = 0; $i < $maxNodes; $i++) {
-      $nodes[] = $nodesList[$i];
+      $nodes[$nodesList[$i]] = $nodesList[$i];
+      $nodesBak[] = $nodesList[$i];
     }
     $_t = array('vid', 'name', 'description', 'help', 'relations', 'hierarchy', 'multiple',
       'required', 'tags', 'module', 'weight', 'nodes');
@@ -33,6 +34,9 @@ class TaxonomyVocabularyFunctions extend
    
     // exec save function
     taxonomy_save_vocabulary($edit);
+    //after save we use $nodesBak
+    sort($nodesBak);
+    $edit['nodes'] = $nodesBak;
     $vocabularies = taxonomy_get_vocabularies();
     foreach($vocabularies as $voc) {
       if ($voc->name == $name) {
@@ -236,7 +240,7 @@ class TaxonomyTestNodeApi extends Drupal
   }
 
   function testTaxonomyNode() {
-    $this->drupalModuleEnable('story');
+    //$this->drupalModuleEnable('story');
     
     //preparing data
     // vocabulary hierarchy->single, multiple -> on
Index: tests/upload_tests.test
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/simpletest/tests/upload_tests.test,v
retrieving revision 1.7
diff -u -p -r1.7 upload_tests.test
--- tests/upload_tests.test	2 Sep 2006 18:03:59 -0000	1.7
+++ tests/upload_tests.test	1 Jun 2007 13:12:25 -0000
@@ -385,8 +385,7 @@ class UploadPictureTests extends DrupalT
       $pic_path = file_directory_path() .'/'.$picture_dir .'/picture-'.$user->uid.'.jpg';
 
       // get full url to the user's image
-      $picture = file_create_url($pic_path);
-      
+      $picture = file_create_url($pic_path);  
 
       // check if image is displayed in user's profile page
       $content = $this->drupalGetContent();
Index: tests/user_registration_test.test
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/simpletest/tests/user_registration_test.test,v
retrieving revision 1.9
diff -u -p -r1.9 user_registration_test.test
--- tests/user_registration_test.test	6 Sep 2006 08:11:50 -0000	1.9
+++ tests/user_registration_test.test	1 Jun 2007 13:12:28 -0000
@@ -52,7 +52,7 @@ class UserRegistrationTest extends Drupa
     /* We try to login with a wrong password */
     $login_edit = array('name' => $name, 'pass' => 'foo');
     $this->drupalPostRequest('user', $login_edit, 'Log in');
-    $this->assertWantedText(t('Sorry, unrecognized username or password.'), 'Test for failed Login');
+    $this->assertWantedText(t('Sorry, unrecognized username or password. Have you forgotten your password?'), 'Test for failed Login');
     $url = user_pass_reset_url($user);
     /* TODO: find a better way, we currently have to do it that way, see user.module line 1041. */
     sleep(1);
@@ -77,8 +77,8 @@ class UserRegistrationTest extends Drupa
     $this->assertEqual($user->pass, md5($new_pass), 'Correct password in database');
     
     /* logout */
-    $this->clickLink('log out'); 
-    $this->assertNoUnwantedText($user->name, 'Logged out');
+    $this->clickLink('Log out'); 
+    $this->assertNoText($user->name, 'Logged out');
     
     /* login again */
     $login_edit['pass'] = $new_pass;
Index: tests/user_validation.test
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/simpletest/tests/user_validation.test,v
retrieving revision 1.1
diff -u -p -r1.1 user_validation.test
--- tests/user_validation.test	24 Aug 2005 19:10:02 -0000	1.1
+++ tests/user_validation.test	1 Jun 2007 13:12:28 -0000
@@ -20,7 +20,7 @@ class UserValidationTest extends DrupalT
     $this->assertNotNull($result, 'Invalid chars in username');
   }
   function testMaxLengthName() {
-    $name = str_repeat('a', 57);
+    $name = str_repeat('a', 61);
     $result = user_validate_name($name);
     $this->assertNotNull($result, 'Excessively long username');
   }
