Changeset 1072 in tests for trunk/tests/ms.php
- Timestamp:
- 10/04/2012 12:40:41 PM (13 years ago)
- File:
-
- 1 edited
-
trunk/tests/ms.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/ms.php
r1060 r1072 359 359 $this->assertEquals( '/', $blog->path ); 360 360 361 // Test defaulting to current blog 362 $this->assertEquals( $blog, get_blog_details() ); 363 361 364 $user_id = $this->factory->user->create( array( 'role' => 'administrator' ) ); 362 365 $blog_id = $this->factory->blog->create( array( 'user_id' => $user_id, 'path' => '/test_blogname', 'title' => 'Test Title' ) ); … … 557 560 $this->assertEquals( 0, get_blog_id_from_url( $details->domain, $details->path ) ); 558 561 } 562 563 function test_is_main_site() { 564 $this->assertTrue( is_main_site() ); 565 $this->assertTrue( is_main_site( get_current_blog_id() ) ); 566 567 $user_id = $this->factory->user->create( array( 'role' => 'administrator' ) ); 568 $blog_id = $this->factory->blog->create( array( 'user_id' => $user_id ) ); 569 570 switch_to_blog( $blog_id ); 571 $this->assertFalse( is_main_site( $blog_id ) ); 572 $this->assertFalse( is_main_site( get_current_blog_id() ) ); 573 $this->assertFalse( is_main_site() ); 574 575 restore_current_blog(); 576 } 559 577 } 560 578
Note: See TracChangeset
for help on using the changeset viewer.