Changeset 39626
- Timestamp:
- 12/21/2016 04:58:47 AM (8 years ago)
- Location:
- trunk/tests/phpunit
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/includes/testcase.php
r38678 r39626 58 58 59 59 public static function setUpBeforeClass() { 60 global $wpdb; 61 62 $wpdb->suppress_errors = false; 63 $wpdb->show_errors = true; 64 $wpdb->db_connect(); 65 ini_set('display_errors', 1 ); 66 60 67 parent::setUpBeforeClass(); 61 68 … … 99 106 } 100 107 101 global $wpdb, $wp_rewrite; 102 $wpdb->suppress_errors = false; 103 $wpdb->show_errors = true; 104 $wpdb->db_connect(); 105 ini_set('display_errors', 1 ); 108 global $wp_rewrite; 109 106 110 $this->clean_up_global_scope(); 107 111 -
trunk/tests/phpunit/includes/utils.php
r38832 r39626 390 390 $this->field_types = $wpdb->field_types; 391 391 $this->charset = $wpdb->charset; 392 393 $this->dbuser = $wpdb->dbuser; 394 $this->dbpassword = $wpdb->dbpassword; 395 $this->dbname = $wpdb->dbname; 396 $this->dbhost = $wpdb->dbhost; 392 397 } 393 398 -
trunk/tests/phpunit/tests/db.php
r39275 r39626 21 21 22 22 public static function setUpBeforeClass() { 23 parent::setUpBeforeClass(); 23 24 self::$_wpdb = new wpdb_exposed_methods_for_testing(); 24 25 } … … 64 65 65 66 $var = $wpdb->get_var( "SELECT ID FROM $wpdb->users LIMIT 1" ); 67 68 // Ensure all database handles have been properly reconnected after this test. 69 $wpdb->db_connect(); 70 self::$_wpdb->db_connect(); 71 66 72 $this->assertGreaterThan( 0, $var ); 67 73 } -
trunk/tests/phpunit/tests/db/charset.php
r38843 r39626 23 23 24 24 public static function setUpBeforeClass() { 25 parent::setUpBeforeClass(); 26 25 27 require_once( dirname( dirname( __FILE__ ) ) . '/db.php' ); 26 28 -
trunk/tests/phpunit/tests/rewrite/numericSlugs.php
r36717 r39626 17 17 18 18 public function tearDown() { 19 parent::tearDown(); 19 20 remove_filter( 'wp_unique_post_slug', array( $this, 'filter_unique_post_slug' ), 10, 6 ); 20 21 }
Note: See TracChangeset
for help on using the changeset viewer.