Changeset 30786
- Timestamp:
- 12/08/2014 02:32:53 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/multisite/site.php
r30785 r30786 37 37 $this->assertEquals( $current_blog_id, wp_cache_get( 'switch-test', 'switch-test' ) ); 38 38 39 $user_id = $this->factory->user->create( array( 'role' => 'administrator' ) ); 40 $blog_id = $this->factory->blog->create( array( 'user_id' => $user_id, 'path' => '/test_blogpath', 'title' => 'Test Title' ) ); 39 $blog_id = $this->factory->blog->create(); 41 40 42 41 $cap_key = wp_get_current_user()->cap_key; … … 336 335 337 336 function test_update_blog_details() { 338 $blog_id = $this->factory->blog->create( array( 'path' => '/test_blogpath', 'title' => 'Test Title' ));337 $blog_id = $this->factory->blog->create(); 339 338 340 339 $result = update_blog_details( $blog_id, array( 'domain' => 'example.com', 'path' => 'my_path/' ) ); … … 353 352 $test_action_counter = 0; 354 353 355 $blog_id = $this->factory->blog->create( array( 'path' => '/test_blogpath', 'title' => 'Test Title' ));354 $blog_id = $this->factory->blog->create(); 356 355 update_blog_details( $blog_id, array( 'spam' => 1 ) ); 357 356 … … 377 376 $test_action_counter = 0; 378 377 379 $blog_id = $this->factory->blog->create( array( 'path' => '/test_blogpath', 'title' => 'Test Title' ));378 $blog_id = $this->factory->blog->create(); 380 379 381 380 add_action( 'make_spam_blog', array( $this, '_action_counter_cb' ), 10 ); … … 400 399 $test_action_counter = 0; 401 400 402 $blog_id = $this->factory->blog->create( array( 'path' => '/test_blogpath', 'title' => 'Test Title' ));401 $blog_id = $this->factory->blog->create(); 403 402 404 403 add_action( 'archive_blog', array( $this, '_action_counter_cb' ), 10 ); … … 423 422 $test_action_counter = 0; 424 423 425 $blog_id = $this->factory->blog->create( array( 'path' => '/test_blogpath', 'title' => 'Test Title' ));424 $blog_id = $this->factory->blog->create(); 426 425 update_blog_details( $blog_id, array( 'archived' => 1 ) ); 427 426 … … 446 445 $test_action_counter = 0; 447 446 448 $blog_id = $this->factory->blog->create( array( 'path' => '/test_blogpath', 'title' => 'Test Title' ));447 $blog_id = $this->factory->blog->create(); 449 448 450 449 add_action( 'make_delete_blog', array( $this, '_action_counter_cb' ), 10 ); … … 469 468 $test_action_counter = 0; 470 469 471 $blog_id = $this->factory->blog->create( array( 'path' => '/test_blogpath', 'title' => 'Test Title' ));470 $blog_id = $this->factory->blog->create(); 472 471 update_blog_details( $blog_id, array( 'deleted' => 1 ) ); 473 472 … … 493 492 $test_action_counter = 0; 494 493 495 $blog_id = $this->factory->blog->create( array( 'path' => '/test_blogpath', 'title' => 'Test Title' ));494 $blog_id = $this->factory->blog->create(); 496 495 497 496 add_action( 'mature_blog', array( $this, '_action_counter_cb' ), 10 ); … … 516 515 $test_action_counter = 0; 517 516 518 $blog_id = $this->factory->blog->create( array( 'path' => '/test_blogpath', 'title' => 'Test Title' ));517 $blog_id = $this->factory->blog->create(); 519 518 update_blog_details( $blog_id, array( 'mature' => 1 ) ); 520 519 … … 994 993 */ 995 994 function test_get_blog_id_from_url() { 996 $blog_id = $this->factory->blog->create( array( 'path' => '/xyz', 'title' => 'Test Title' ));995 $blog_id = $this->factory->blog->create(); 997 996 $details = get_blog_details( $blog_id, false ); 998 997 $key = md5( $details->domain . $details->path ); … … 1007 1006 */ 1008 1007 function test_get_blog_id_from_url_is_case_insensitive() { 1009 $blog_id = $this->factory->blog->create( array( ' path' => '/xyz', 'title' => 'Test Title' ) );1008 $blog_id = $this->factory->blog->create( array( 'domain' => 'example.com', 'path' => '/xyz' ) ); 1010 1009 $details = get_blog_details( $blog_id, false ); 1011 1010 … … 1017 1016 */ 1018 1017 function test_get_blog_id_from_url_that_does_not_exist() { 1019 $blog_id = $this->factory->blog->create( array( 'path' => '/xyz' , 'title' => 'Test Title') );1018 $blog_id = $this->factory->blog->create( array( 'path' => '/xyz' ) ); 1020 1019 $details = get_blog_details( $blog_id, false ); 1021 1020 … … 1029 1028 */ 1030 1029 function test_get_blog_id_from_url_with_deleted_flag() { 1031 $blog_id = $this->factory->blog->create( array( 'path' => '/xyz', 'title' => 'Test Title' ));1030 $blog_id = $this->factory->blog->create(); 1032 1031 $details = get_blog_details( $blog_id, false ); 1033 1032 $key = md5( $details->domain . $details->path ); … … 1043 1042 */ 1044 1043 function test_get_blog_id_from_url_after_dropped() { 1045 $blog_id = $this->factory->blog->create( array( 'path' => '/xyz', 'title' => 'Test Title' ));1044 $blog_id = $this->factory->blog->create(); 1046 1045 $details = get_blog_details( $blog_id, false ); 1047 1046 $key = md5( $details->domain . $details->path ); … … 1100 1099 $this->assertEquals( '', $info['error'] ); 1101 1100 1102 $user_id = $this->factory->user->create( array( 'role' => 'administrator' ) ); 1103 $blog_id = $this->factory->blog->create( array( 'user_id' => $user_id ) ); 1101 $blog_id = $this->factory->blog->create(); 1104 1102 1105 1103 switch_to_blog( $blog_id );
Note: See TracChangeset
for help on using the changeset viewer.