Skip to content

Commit

Permalink
Defining the temp directory based on what the OS defines it as
Browse files Browse the repository at this point in the history
  • Loading branch information
aldavigdis committed Feb 14, 2024
1 parent 5807f1b commit 09600af
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@

declare(strict_types = 1);

$tmp_dir = sys_get_temp_dir();

// As WordPress is still using and supporting PHPUnit 6, we need to create
// certain empty classes expected for that version of PHPUnit in order to
// supress errors when we run PHPUnit 9.
require __DIR__ . '/_/SupressFrameworkError.php';
require __DIR__ . '/_/SupressFramework.php';

// Include the WordPress test suite.
require '/tmp/wordpress-tests-lib/includes/functions.php';
require '/tmp/wordpress-tests-lib/includes/bootstrap.php';
require "{$tmp_dir}/wordpress-tests-lib/includes/functions.php";
require "{$tmp_dir}/wordpress-tests-lib/includes/bootstrap.php";

0 comments on commit 09600af

Please sign in to comment.