WordPress.org

Make WordPress Core

Ticket #40071: 40071.diff

File 40071.diff, 1.2 KB (added by johnbillion, 3 years ago)
  • tests/phpunit/includes/bootstrap.php

    diff --git a/tests/phpunit/includes/bootstrap.php b/tests/phpunit/includes/bootstrap.php
    index b462e7039b..de93fc5497 100644
    a b tests_reset__SERVER(); 
    2929
    3030define( 'WP_TESTS_TABLE_PREFIX', $table_prefix );
    3131define( 'DIR_TESTDATA', dirname( __FILE__ ) . '/../data' );
     32define( 'DIR_TESTROOT', realpath( dirname( dirname( __FILE__ ) ) ) );
    3233
    3334define( 'WP_LANG_DIR', DIR_TESTDATA . '/languages' );
    3435
  • tests/phpunit/tests/rest-api/rest-schema-setup.php

    diff --git a/tests/phpunit/tests/rest-api/rest-schema-setup.php b/tests/phpunit/tests/rest-api/rest-schema-setup.php
    index eea2224331..a97a445444 100644
    a b class WP_Test_REST_Schema_Initialization extends WP_Test_REST_TestCase { 
    299299                        echo "Skipping generation of API client fixtures due to unsupported JSON_* constants.\n";
    300300                } else {
    301301                        // Save the route object for QUnit tests.
    302                         $file = './tests/qunit/fixtures/wp-api-generated.js';
     302                        $file = dirname( DIR_TESTROOT ) . '/qunit/fixtures/wp-api-generated.js';
    303303                        file_put_contents( $file, $mocked_responses );
    304304                }
    305305