Making WordPress.org

Ticket #2766: 2766.patch

File 2766.patch, 2.1 KB (added by SergeyBiryukov, 9 years ago)
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/tests/phpunit/tests/api/locale-banner.php

     
    1313         * @type array  $expected_sites Rosetta sites that should be present in the banner text.
    1414         */
    1515        function test_locale_banner( $header, $expected_sites ) {
    16                 $response = wp_remote_post( 'https://wordpress.org/plugins-wp/wp-json/plugins/v1/locale-banner', [
     16                $response = wp_remote_post( 'https://wordpress.org/plugins/wp-json/plugins/v1/locale-banner', [
    1717                        'headers' => [
    1818                                'Accept-Language' => $header,
    1919                        ],
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/tests/phpunit/tests/api/svn-access.php

     
    77class Tests_API_SVN_Access extends WP_UnitTestCase {
    88
    99        function test_permission_denied() {
    10                 $response = wp_remote_get( 'https://wordpress.org/plugins-wp/wp-json/plugins/v1/svn-access' );
     10                $response = wp_remote_get( 'https://wordpress.org/plugins/wp-json/plugins/v1/svn-access' );
    1111                $data = json_decode( wp_remote_retrieve_body( $response ), true );
    1212
    1313                $this->assertEquals( 'not_authorized', $data['code'] );
     
    1414        }
    1515
    1616        function test_permission_denied_with_bad_authorization() {
    17                 $response = wp_remote_get( 'https://wordpress.org/plugins-wp/wp-json/plugins/v1/svn-access', array(
     17                $response = wp_remote_get( 'https://wordpress.org/plugins/wp-json/plugins/v1/svn-access', array(
    1818                        'headers' => array(
    1919                                'Authorization' => 'lol like this would be a real auth key'
    2020                        ),