Exemplo n.º 1
0
 /**
  * Prepares the environment before the first test is run
  *
  * NOTE: Not using standard setUpBeforeClass() because we need to have
  * the child class setting one of this class' static properties
  *
  * @return void
  */
 public static function set_up_before_class()
 {
     global $wpdb, $wp_object_cache;
     $wp_object_cache = new WP_Object_Cache();
     self::$lss = new Accessor();
     if (self::$db_needed && self::are_transactions_available()) {
         self::$db_has_transactions = true;
         $wpdb->query('START TRANSACTION');
         $wpdb->query('DELETE FROM `' . self::$lss->table_fail . '`');
     } else {
         self::$db_has_transactions = false;
     }
 }