/[drupal]/drupal/modules/simpletest/drupal_web_test_case.php
ViewVC logotype

Diff of /drupal/modules/simpletest/drupal_web_test_case.php

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.173 by webchick, Sat Nov 21 00:43:42 2009 UTC revision 1.174 by dries, Sat Nov 21 14:35:05 2009 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: drupal_web_test_case.php,v 1.172 2009/11/20 05:14:13 webchick Exp $  // $Id: drupal_web_test_case.php,v 1.173 2009/11/21 00:43:42 webchick Exp $
3    
4  /**  /**
5   * Base class for Drupal tests.   * Base class for Drupal tests.
# Line 539  class DrupalUnitTestCase extends DrupalT Line 539  class DrupalUnitTestCase extends DrupalT
539      $this->originalPrefix = $db_prefix;      $this->originalPrefix = $db_prefix;
540      $this->originalFileDirectory = file_directory_path();      $this->originalFileDirectory = file_directory_path();
541    
542        // Reset all statics so that test is performed with a clean environment.
543        drupal_static_reset();
544    
545      // Generate temporary prefixed database to ensure that tests have a clean starting point.      // Generate temporary prefixed database to ensure that tests have a clean starting point.
546      $db_prefix = Database::getConnection()->prefixTables('{simpletest' . mt_rand(1000, 1000000) . '}');      $db_prefix = Database::getConnection()->prefixTables('{simpletest' . mt_rand(1000, 1000000) . '}');
547      $conf['file_public_path'] = $this->originalFileDirectory . '/' . $db_prefix;      $conf['file_public_path'] = $this->originalFileDirectory . '/' . $db_prefix;
# Line 1053  class DrupalWebTestCase extends DrupalTe Line 1056  class DrupalWebTestCase extends DrupalTe
1056      ini_set('log_errors', 1);      ini_set('log_errors', 1);
1057      ini_set('error_log', $directory . '/error.log');      ini_set('error_log', $directory . '/error.log');
1058    
1059        // Reset all statics so that test is performed with a clean environment.
1060        drupal_static_reset();
1061    
1062      include_once DRUPAL_ROOT . '/includes/install.inc';      include_once DRUPAL_ROOT . '/includes/install.inc';
1063      drupal_install_system();      drupal_install_system();
1064    

Legend:
Removed from v.1.173  
changed lines
  Added in v.1.174

  ViewVC Help
Powered by ViewVC 1.1.3