Changeset 32518 for trunk/tests/phpunit/tests/option/multisite.php
- Timestamp:
- 05/20/2015 07:02:42 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/option/multisite.php
r31623 r32518 101 101 102 102 function test_with_another_site() { 103 global $current_site, $base; 104 105 $title = 'Fooblog'; 106 $domain = 'blogoptiontest'; 107 108 if ( is_subdomain_install() ) { 109 $newdomain = $domain . '.' . preg_replace( '|^www\.|', '', $current_site->domain ); 110 $path = $base; 111 } else { 112 $newdomain = $current_site->domain; 113 $path = $base . $domain . '/'; 114 } 115 116 $email = 'foo@foo.foo'; 117 $password = wp_generate_password( 12, false ); 118 $user_id = wpmu_create_user( $domain, $password, $email ); 103 $user_id = $this->factory->user->create(); 119 104 $this->assertInternalType( 'integer', $user_id ); 120 105 121 $blog_id = wpmu_create_blog( $newdomain, $path, $title, $user_id , array( 'public' => 1 ), $current_site->id ); 106 $blog_id = $this->factory->blog->create( array( 107 'user_id' => $user_id, 108 'meta' => array( 109 'public' => 1, 110 ), 111 ) ); 122 112 $this->assertInternalType( 'integer', $blog_id ); 123 113
Note: See TracChangeset
for help on using the changeset viewer.