Skip to content

Commit

Permalink
Update bootstrap.php
Browse files Browse the repository at this point in the history
  • Loading branch information
remcotolsma committed Apr 22, 2024
1 parent 1b0f4a4 commit 5710b7e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tests/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@
* @package Pronamic\WordPress\Pay\Gateways\Mollie
*/

/**
* Give access to tests_add_filter() function.
*
* @link https://github.com/wp-phpunit/example-plugin/blob/master/tests/bootstrap.php
*/
require_once getenv( 'WP_PHPUNIT__DIR' ) . '/includes/functions.php';

/**
Expand All @@ -25,12 +30,14 @@
* @link https://github.com/WordPress/wordpress-playground/blob/23c0fc6aae5d090a14d352160c34d39988167406/packages/playground/wordpress/build/Dockerfile#L25-L42
*/
if ( ! is_dir( __DIR__ . '/../wordpress/wp-content/' ) ) {
// phpcs:ignore WordPressVIPMinimum.Functions.RestrictedFunctions.directory_mkdir
mkdir( __DIR__ . '/../wordpress/wp-content/' );
}

$db_dropin_file = __DIR__ . '/../wordpress/wp-content/db.php';

if ( ! is_file( $db_dropin_file ) ) {
// phpcs:ignore WordPressVIPMinimum.Functions.RestrictedFunctions.file_ops_file_put_contents
file_put_contents(
$db_dropin_file,
str_replace(
Expand Down

0 comments on commit 5710b7e

Please sign in to comment.