Changeset 928 in tests for trunk/tests/xmlrpc/wp/uploadFile.php
- Timestamp:
- 07/19/2012 07:46:53 PM (14 years ago)
- File:
-
- 1 edited
-
trunk/tests/xmlrpc/wp/uploadFile.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/xmlrpc/wp/uploadFile.php
r911 r928 33 33 */ 34 34 function test_network_limit() { 35 $this->make_user_by_role( 'editor' ); 36 37 update_option( 'blog_upload_space', 0.1 ); 38 39 // create attachment 40 $filename = ( DIR_TESTDATA.'/images/canola.jpg' ); 41 $contents = file_get_contents( $filename ); 42 $data = array( 43 'name' => 'a2-small.jpg', 44 'type' => 'image/jpeg', 45 'bits' => base64_encode( $contents ) 46 ); 47 48 $result = $this->myxmlrpcserver->mw_newMediaObject( array( 0, 'editor', 'editor', $data ) ); 49 50 // Only multisite should have a limit 35 51 if ( is_multisite() ) { 36 $this->make_user_by_role( 'editor' );37 38 update_option( 'blog_upload_space', 0.1 );39 40 // create attachment41 $filename = ( DIR_TESTDATA.'/images/canola.jpg' );42 $contents = file_get_contents( $filename );43 $data = array(44 'name' => 'a2-small.jpg',45 'type' => 'image/jpeg',46 'bits' => base64_encode( $contents )47 );48 49 $result = $this->myxmlrpcserver->mw_newMediaObject( array( 0, 'editor', 'editor', $data ) );50 52 $this->assertInstanceOf( 'IXR_Error', $result ); 51 53 } 54 else { 55 $this->assertNotInstanceOf( 'IXR_Error', $result ); 56 } 57 52 58 } 53 59 }
Note: See TracChangeset
for help on using the changeset viewer.