Skip to content

Commit

Permalink
Define WP_RUN_CORE_TESTS during tests (#531)
Browse files Browse the repository at this point in the history
  • Loading branch information
srtfisher committed Apr 17, 2024
1 parent b43b242 commit 87f24c8
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,16 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## v1.0.4 - 2024-04-17

### Added

- Define the `WP_RUN_CORE_TESTS` constant during unit tests.

### Fixed

- Ensure that dumping the content dumps non-json content,

## v1.0.3 - 2024-04-15

### Fixed
Expand Down
5 changes: 5 additions & 0 deletions src/mantle/testing/wordpress-bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,11 @@
define( 'WP_TESTS_TABLE_PREFIX', $table_prefix );
define( 'DIR_TESTDATA', __DIR__ . '/data' );

// Set the core test constant.
if ( ! defined( 'WP_RUN_CORE_TESTS' ) ) {
define( 'WP_RUN_CORE_TESTS', true );
}

/*
* Cron tries to make an HTTP request to the site, which always fails,
* because tests are run in CLI mode only.
Expand Down

0 comments on commit 87f24c8

Please sign in to comment.