| | 1187 | |
| | 1188 | /** |
| | 1189 | * @ticket 33620, test to make sure a site will be created as https if its a subdomain install and the sireurl is https |
| | 1190 | */ |
| | 1191 | function test_create_https_blog(){ |
| | 1192 | // test only works on subdomain installs |
| | 1193 | $this->assertEquals( SUBDOMAIN_INSTALL, false ); |
| | 1194 | |
| | 1195 | //get the current siteurl |
| | 1196 | $existing_siteurl = get_site_option( 'siteurl' ); |
| | 1197 | |
| | 1198 | // set the site url to https |
| | 1199 | update_site_option( 'siteurl', str_replace( "http://", "https://", $existing_siteurl ) ); |
| | 1200 | |
| | 1201 | //make a new blog |
| | 1202 | $blog_id = $this->factory->blog->create(); |
| | 1203 | |
| | 1204 | //get the new blogs details |
| | 1205 | $details = get_blog_details( $blog_id ); |
| | 1206 | |
| | 1207 | //test if the blog home is https |
| | 1208 | $this->assertContains( 'https', $details->siteurl ); |
| | 1209 | } |