|
108 | 108 | } |
109 | 109 |
|
110 | 110 | /** |
111 | | - * Sets up the SSH private key for use in the test environment if provided. |
| 111 | + * Performs a series of operations to set up the test environment. This includes creating a preparation directory, |
| 112 | + * cloning the WordPress development repository, and preparing the environment with npm. |
112 | 113 | */ |
113 | 114 | // Prepare an array of shell commands to set up the testing environment. |
114 | 115 | perform_operations( array( |
|
120 | 121 | // The '--depth=1' flag creates a shallow clone with a history truncated to the last commit. |
121 | 122 | 'git clone --depth=1 https://github.com/WordPress/wordpress-develop.git ' . escapeshellarg( $WPT_PREPARE_DIR ), |
122 | 123 |
|
123 | | - // Download the WordPress importer plugin zip file to the specified plugins directory. |
124 | | - 'wget -O ' . escapeshellarg( $WPT_PREPARE_DIR . '/tests/phpunit/data/plugins/wordpress-importer.zip' ) . ' https://downloads.wordpress.org/plugin/wordpress-importer.zip' . $certificate_validation, |
125 | | - |
126 | | - // Change directory to the plugin directory, unzip the WordPress importer plugin, and remove the zip file. |
127 | | - 'cd ' . escapeshellarg( $WPT_PREPARE_DIR . '/tests/phpunit/data/plugins/' ) . '; unzip wordpress-importer.zip; rm wordpress-importer.zip', |
128 | | - |
129 | 124 | // Change directory to the preparation directory, install npm dependencies, and build the project. |
130 | 125 | 'cd ' . escapeshellarg( $WPT_PREPARE_DIR ) . '; npm install && npm run build' |
131 | 126 |
|
@@ -303,13 +298,13 @@ function curl_selected_bits(\$k) { return in_array(\$k, array('version', 'ssl_ve |
303 | 298 | log_message( 'Environment PHP Version: ' . $env_php_version ); |
304 | 299 |
|
305 | 300 | /** |
306 | | - * Checks if the detected PHP version is below 7.0. |
307 | | - * The test runner requires PHP version 7.0 or above, and if the environment's PHP version |
| 301 | + * Checks if the detected PHP version is below 7.2. |
| 302 | + * The test runner requires PHP version 7.2 or above, and if the environment's PHP version |
308 | 303 | * is lower, it logs an error message and could terminate the script. |
309 | 304 | */ |
310 | | -if ( version_compare( $env_php_version, '7.0', '<' ) ) { |
311 | | - // Logs an error message indicating the test runner's incompatibility with PHP versions below 7.0. |
312 | | - error_message( 'The test runner is not compatible with PHP < 7.0.' ); |
| 305 | +if ( version_compare( $env_php_version, '7.2', '<' ) ) { |
| 306 | + // Logs an error message indicating the test runner's incompatibility with PHP versions below 7.2. |
| 307 | + error_message( 'The test runner is not compatible with PHP < 7.2.' ); |
313 | 308 | } |
314 | 309 |
|
315 | 310 | /** |
|
0 commit comments