From 36c07fd0e553c7347a9953a3078f4301b996ddcb Mon Sep 17 00:00:00 2001 From: Pascal Birchler Date: Tue, 1 Oct 2024 15:42:01 +0200 Subject: [PATCH] PHPUnit: Fix regex in bootstrap file --- tests/bootstrap.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/bootstrap.php b/tests/bootstrap.php index 0b7f434e..c66cd935 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -43,7 +43,7 @@ function wpcli_tests_include_config( array $config_filenames = [] ) { if ( $config_filename ) { $config = file_get_contents( $config_filename ); $matches = null; - $pattern = '/bootstrap="(?P.*)"/'; + $pattern = '/bootstrap="(?P[^"]*)"/'; $result = preg_match( $pattern, $config, $matches ); if ( isset( $matches['bootstrap'] ) && file_exists( $matches['bootstrap'] ) ) { include_once PACKAGE_ROOT . '/' . $matches['bootstrap'];