Changeset 25397 for trunk/tests/phpunit/tests/ms.php
- Timestamp:
- 09/12/2013 07:16:30 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/ms.php
r25197 r25397 11 11 12 12 protected $plugin_hook_count = 0; 13 14 function setUp() { 15 parent::setUp(); 16 17 $_SERVER['REMOTE_ADDR'] = ''; 18 add_action( 'deprecated_function_run', array( $this, 'deprecated_function_run_check' ) ); 19 } 20 21 function tearDown() { 22 parent::tearDown(); 23 remove_action( 'deprecated_function_run', array( $this, 'deprecated_function_run_check' ) ); 24 } 25 26 function deprecated_function_run_check( $function ) { 27 if ( in_array( $function, array( 'is_blog_user', 'get_dashboard_blog' ) ) ) 28 add_filter( 'deprecated_function_trigger_error', array( $this, 'filter_deprecated_function_trigger_error' ) ); 29 } 30 31 function filter_deprecated_function_trigger_error() { 32 remove_filter( 'deprecated_function_trigger_error', array( $this, 'filter_deprecated_function_trigger_error' ) ); 33 return false; 34 } 13 35 14 36 function test_create_and_delete_blog() { … … 309 331 $this->assertTrue( is_upload_space_available() ); 310 332 311 if ( ! file_exists( BLOGSUPLOADDIR ) )333 if ( defined( 'BLOGSUPLOADDIR' ) && ! file_exists( BLOGSUPLOADDIR ) ) 312 334 $this->markTestSkipped( 'This test is broken when blogs.dir does not exist. '); 313 335 … … 526 548 /** 527 549 * Test fetching a blog that doesn't exist and again after it exists. 528 * 550 * 529 551 * @ticket 23405 530 552 */ … … 1014 1036 ) ); 1015 1037 update_user_status( $spam_user_id, 'spam', '1' ); 1016 1038 1017 1039 $this->assertTrue( is_user_spammy( $spam_username ) ); 1018 1040 $this->assertFalse( is_user_spammy( 'testuser1' ) );
Note: See TracChangeset
for help on using the changeset viewer.