WordPress.org

Make WordPress Core

Ticket #45863: 45863.diff

File 45863.diff, 1.3 KB (added by atimmer, 11 months ago)
  • tests/phpunit/includes/bootstrap.php

     
    3636require_once $config_file_path;
    3737require_once dirname( __FILE__ ) . '/functions.php';
    3838
    39 if ( defined( 'WP_RUN_CORE_TESTS' ) && WP_RUN_CORE_TESTS && file_exists( ABSPATH . '_index.php' ) ) {
    40         // Perhaps add more documentation about having to run `grunt` before running tests after changing code.
    41         echo "ERROR: ABSPATH must point to the `build` directory, not the `src` directory. Please update your wp-tests-config.php file.\n";
    42         exit( 1 );
    43 }
    44 
    4539tests_reset__SERVER();
    4640
    4741define( 'WP_TESTS_TABLE_PREFIX', $table_prefix );
  • wp-tests-config-sample.php

     
    11<?php
    22
    33/* Path to the WordPress codebase you'd like to test. Add a forward slash in the end. */
    4 if ( defined( 'WP_RUN_CORE_TESTS' ) && WP_RUN_CORE_TESTS ) {
    5         define( 'ABSPATH', dirname( __FILE__ ) . '/build/' );
    6 } else {
    7         define( 'ABSPATH', dirname( __FILE__ ) . '/src/' );
    8 }
     4define( 'ABSPATH', dirname( __FILE__ ) . '/src/' );
    95
    106/*
    117 * Path to the theme to test with.