Changeset 32148
- Timestamp:
- 04/19/2015 07:42:52 AM (9 years ago)
- Location:
- branches/4.0/tests/phpunit
- Files:
-
- 22 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/4.0/tests/phpunit/includes/utils.php
r29120 r32148 355 355 remove_filter( 'get_the_terms', array( 'Featured_Content', 'hide_the_featured_term' ), 10, 3 ); 356 356 } 357 358 /** 359 * Special class for exposing protected wpdb methods we need to access 360 */ 361 class wpdb_exposed_methods_for_testing extends wpdb { 362 public function __construct() { 363 global $wpdb; 364 $this->dbh = $wpdb->dbh; 365 $this->use_mysqli = $wpdb->use_mysqli; 366 $this->ready = true; 367 $this->field_types = $wpdb->field_types; 368 $this->charset = $wpdb->charset; 369 } 370 371 public function __call( $name, $arguments ) { 372 return call_user_func_array( array( $this, $name ), $arguments ); 373 } 374 } -
branches/4.0/tests/phpunit/tests/admin/includesScreen.php
r26456 r32148 38 38 39 39 function tearDown() { 40 parent::tearDown();41 40 unset( $GLOBALS['wp_taxonomies']['old-or-new'] ); 42 41 set_current_screen( 'front' ); 42 parent::tearDown(); 43 43 } 44 44 -
branches/4.0/tests/phpunit/tests/ajax/Autosave.php
r26995 r32148 47 47 */ 48 48 public function tearDown() { 49 wp_set_current_user( 0 ); 49 50 parent::tearDown(); 50 wp_set_current_user( 0 );51 51 } 52 52 -
branches/4.0/tests/phpunit/tests/ajax/Response.php
r25002 r32148 37 37 */ 38 38 public function tearDown() { 39 parent::tearDown();40 39 remove_filter( 'wp_die_ajax_handler', array( $this, 'getDieHandler' ), 1, 1 ); 41 40 error_reporting( $this->_error_level ); 41 parent::tearDown(); 42 42 } 43 43 -
branches/4.0/tests/phpunit/tests/basic.php
r28631 r32148 14 14 15 15 function tearDown() { 16 $this->val = false; 16 17 parent::tearDown(); 17 $this->val = false;18 18 } 19 19 -
branches/4.0/tests/phpunit/tests/cache.php
r25002 r32148 15 15 16 16 function tearDown() { 17 $this->flush_cache(); 17 18 parent::tearDown(); 18 $this->flush_cache();19 19 } 20 20 -
branches/4.0/tests/phpunit/tests/canonical.php
r28966 r32148 86 86 function tearDown() { 87 87 global $wp_rewrite; 88 wp_set_current_user( $this->old_current_user ); 89 90 $wp_rewrite->init(); 88 91 parent::tearDown(); 89 wp_set_current_user( $this->old_current_user );90 91 $wp_rewrite->init();92 92 } 93 93 -
branches/4.0/tests/phpunit/tests/canonical/pageOnFront.php
r28966 r32148 21 21 function tearDown() { 22 22 global $wp_rewrite; 23 $wp_rewrite->init(); 23 24 parent::tearDown(); 24 $wp_rewrite->init();25 25 } 26 26 -
branches/4.0/tests/phpunit/tests/category.php
r28706 r32148 11 11 12 12 function tearDown() { 13 _unregister_taxonomy( 'test_tax_cat' ); 13 14 parent::tearDown(); 14 15 _unregister_taxonomy( 'test_tax_cat' );16 15 } 17 16 -
branches/4.0/tests/phpunit/tests/comment/getCommentsPagesCount.php
r27055 r32148 27 27 */ 28 28 function tearDown() { 29 parent::tearDown();30 29 update_option( 'page_comments', $this->option_page_comments ); 31 30 update_option( 'comments_per_page', $this->option_page_comments ); 32 31 update_option( 'thread_comments', $this->option_page_comments ); 33 32 update_option( 'posts_per_rss', $this->option_posts_per_rss ); 33 parent::tearDown(); 34 34 } 35 35 -
branches/4.0/tests/phpunit/tests/cron.php
r25368 r32148 14 14 15 15 function tearDown() { 16 parent::tearDown();17 16 // make sure the schedule is clear 18 17 _set_cron_array(array()); 18 parent::tearDown(); 19 19 } 20 20 -
branches/4.0/tests/phpunit/tests/image/base.php
r29120 r32148 23 23 */ 24 24 public function tearDown() { 25 remove_filter( 'wp_image_editors', array( $this, 'setEngine' ), 10, 2 ); 25 26 parent::tearDown(); 26 27 remove_filter( 'wp_image_editors', array( $this, 'setEngine' ), 10, 2 );28 27 } 29 28 -
branches/4.0/tests/phpunit/tests/link.php
r30405 r32148 7 7 function tearDown() { 8 8 global $wp_rewrite; 9 $wp_rewrite->init(); 9 10 parent::tearDown(); 10 $wp_rewrite->init();11 11 } 12 12 -
branches/4.0/tests/phpunit/tests/mail.php
r25381 r32148 12 12 13 13 function tearDown() { 14 unset( $_SERVER['SERVER_NAME'] ); 14 15 parent::tearDown(); 15 unset( $_SERVER['SERVER_NAME'] );16 16 } 17 17 -
branches/4.0/tests/phpunit/tests/post/meta.php
r25002 r32148 34 34 35 35 function tearDown() { 36 parent::tearDown();37 36 wp_delete_post($this->post_id); 38 37 wp_delete_post($this->post_id_2); 38 parent::tearDown(); 39 39 } 40 40 -
branches/4.0/tests/phpunit/tests/post/revisions.php
r28962 r32148 13 13 14 14 function tearDown() { 15 unset( $GLOBALS['wp_post_types'][ $this->post_type ] ); 15 16 parent::tearDown(); 16 unset( $GLOBALS['wp_post_types'][ $this->post_type ] );17 17 } 18 18 -
branches/4.0/tests/phpunit/tests/query/conditionals.php
r29039 r32148 35 35 function tearDown() { 36 36 global $wp_rewrite; 37 $wp_rewrite->init(); 38 37 39 parent::tearDown(); 38 $wp_rewrite->init();39 40 } 40 41 -
branches/4.0/tests/phpunit/tests/query/search.php
r27474 r32148 19 19 20 20 function tearDown() { 21 parent::tearDown();22 23 21 _unregister_post_type( $this->post_type ); 24 22 unset( $this->q ); 23 24 parent::tearDown(); 25 25 } 26 26 -
branches/4.0/tests/phpunit/tests/rewrite.php
r28966 r32148 23 23 function tearDown() { 24 24 global $wp_rewrite; 25 $wp_rewrite->init(); 26 25 27 parent::tearDown(); 26 $wp_rewrite->init();27 28 } 28 29 -
branches/4.0/tests/phpunit/tests/shortcode.php
r29197 r32148 21 21 function tearDown() { 22 22 global $shortcode_tags; 23 parent::tearDown();24 23 foreach ( $this->shortcodes as $shortcode ) 25 24 unset( $shortcode_tags[ $shortcode ] ); 25 parent::tearDown(); 26 26 } 27 27 -
branches/4.0/tests/phpunit/tests/user/mapMetaCap.php
r27390 r32148 33 33 34 34 function tearDown() { 35 parent::tearDown();36 37 35 $GLOBALS['super_admins'] = $this->super_admins; 38 36 unset( $GLOBALS['wp_post_types'][ $this->post_type ] ); 37 parent::tearDown(); 39 38 } 40 39 -
branches/4.0/tests/phpunit/tests/xmlrpc/wp/getPage.php
r25002 r32148 25 25 26 26 function tearDown() { 27 wp_delete_post( $this->post_id ); 27 28 parent::tearDown(); 28 29 wp_delete_post( $this->post_id );30 29 } 31 30
Note: See TracChangeset
for help on using the changeset viewer.