Make WordPress Core


Ignore:
Timestamp:
02/20/2020 05:04:42 PM (5 years ago)
Author:
SergeyBiryukov
Message:

Build/Test Tools: Fix the Travis CI build for the 3.9 branch.

Among other fixes, this backports [28943], [28961], [28964-28968], [28988], [29120], [29251], [29503], [29860], [29869], [29954], [30001], [30160], [30282], [30285], [30289-30291], [30513-30514], [30516-30521], [30523-30524], [30526], [30529-30530], [31253-31254], [31257-31259], [31622], [33374], [40255], [40257], [40259], [40269], [40271], [40446], [40449], [40457], [40604], [40538], [40833], [41082], [41303], [41306], [44993].

See #49485.

Location:
branches/3.9
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/3.9

  • branches/3.9/tests/phpunit/tests/xmlrpc/wp/uploadFile.php

    r25002 r47329  
    3030    }
    3131
    32     /**
    33      * @ticket 21292
    34      */
    35     function test_network_limit() {
    36         $this->make_user_by_role( 'editor' );
    37 
    38         update_option( 'blog_upload_space', 0.1 );
    39 
    40         // create attachment
    41         $filename = ( DIR_TESTDATA . '/images/canola.jpg' );
    42         $contents = file_get_contents( $filename );
    43         $data = array(
    44             'name' => 'canola.jpg',
    45             'type' => 'image/jpeg',
    46             'bits' => $contents
    47         );
    48 
    49         $result = $this->myxmlrpcserver->mw_newMediaObject( array( 0, 'editor', 'editor', $data ) );
    50 
    51         // Only multisite should have a limit
    52         if ( is_multisite() )
    53             $this->assertInstanceOf( 'IXR_Error', $result );
    54         else
    55             $this->assertNotInstanceOf( 'IXR_Error', $result );
    56     }
    57 
    58     /**
    59      * @ticket 11946
    60      */
    61     function test_valid_mime() {
    62         $this->make_user_by_role( 'editor' );
    63 
    64         // create attachment
    65         $filename = ( DIR_TESTDATA . '/images/test-image-mime-jpg.png' );
    66         $contents = file_get_contents( $filename );
    67         $data = array(
    68             'name' => 'test-image-mime-jpg.png',
    69             'type' => 'image/png',
    70             'bits' => $contents
    71         );
    72 
    73         $result = $this->myxmlrpcserver->mw_newMediaObject( array( 0, 'editor', 'editor', $data ) );
    74 
    75         $this->assertNotInstanceOf( 'IXR_Error', $result );
    76 
    77         $this->assertEquals( 'image/jpeg', $result['type'] );
    78     }
    7932}
Note: See TracChangeset for help on using the changeset viewer.