Changeset 30286
- Timestamp:
- 11/08/2014 09:07:05 PM (10 years ago)
- Location:
- trunk/tests/phpunit
- Files:
-
- 1 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/includes/bootstrap.php
r30277 r30286 130 130 131 131 $ajax_message = true; 132 $ms_files_message = true; 132 133 foreach ( $options as $option ) { 133 134 switch ( $option[0] ) { 134 135 case '--exclude-group' : 135 136 $ajax_message = false; 137 $ms_files_message = false; 136 138 continue 2; 137 139 case '--group' : … … 143 145 } 144 146 $ajax_message = ! in_array( 'ajax', $groups ); 147 $ms_files_message = ! in_array( 'ms-files', $groups ); 145 148 continue 2; 146 149 } … … 149 152 echo "Not running ajax tests... To execute these, use --group ajax." . PHP_EOL; 150 153 } 154 if ( $ms_files_message ) { 155 echo "Not running ms_files_rewriting tests... To execute these, use --group ms-files." . PHP_EOL; 156 } 151 157 } 152 158 } -
trunk/tests/phpunit/multisite.xml
r29954 r30286 24 24 <exclude> 25 25 <group>ajax</group> 26 <group>ms-files</group> 26 27 </exclude> 27 28 </groups> -
trunk/tests/phpunit/tests/multisite/site.php
r30175 r30286 950 950 $this->assertEquals( gmstrftime('/%Y/%m'), $info['subdir'] ); 951 951 $this->assertEquals( '', $info['error'] ); 952 953 update_site_option( 'ms_files_rewriting', 1 );954 ms_upload_constants();955 956 $user_id = $this->factory->user->create( array( 'role' => 'administrator' ) );957 $blog_id2 = $this->factory->blog->create( array( 'user_id' => $user_id ) );958 $info = wp_upload_dir();959 $this->assertEquals( 'http://' . $site->domain . '/wp-content/uploads/' . gmstrftime('%Y/%m'), $info['url'] );960 $this->assertEquals( ABSPATH . 'wp-content/uploads/' . gmstrftime('%Y/%m'), $info['path'] );961 $this->assertEquals( gmstrftime('/%Y/%m'), $info['subdir'] );962 $this->assertEquals( '', $info['error'] );963 964 switch_to_blog( $blog_id2 );965 $info2 = wp_upload_dir();966 $this->assertNotEquals( $info, $info2 );967 $this->assertEquals( get_option( 'siteurl' ) . '/wp-content/blogs.dir/' . get_current_blog_id() . '/files/' . gmstrftime('%Y/%m'), $info2['url'] );968 $this->assertEquals( ABSPATH . 'wp-content/blogs.dir/' . get_current_blog_id() . '/files/' . gmstrftime('%Y/%m'), $info2['path'] );969 $this->assertEquals( gmstrftime('/%Y/%m'), $info2['subdir'] );970 $this->assertEquals( '', $info2['error'] );971 restore_current_blog();972 update_site_option( 'ms_files_rewriting', 0 );973 952 } 974 953
Note: See TracChangeset
for help on using the changeset viewer.