diff --git a/composer.json b/composer.json
index 41368ef25e..cb0fbb1740 100644
a
|
b
|
|
16 | 16 | "dealerdirect/phpcodesniffer-composer-installer": "~0.6.0", |
17 | 17 | "wp-coding-standards/wpcs": "~2.3.0", |
18 | 18 | "phpcompatibility/phpcompatibility-wp": "^2.1.0", |
19 | | "phpunit/phpunit": "^7.5" |
| 19 | "phpunit/phpunit": "^7.5", |
| 20 | "ext-gd": "*" |
20 | 21 | }, |
21 | 22 | "autoload-dev": { |
22 | 23 | "files": [ |
diff --git a/tests/phpunit/includes/bootstrap.php b/tests/phpunit/includes/bootstrap.php
index 65c1c370c4..97f1f6e7e3 100644
a
|
b
|
|
34 | 34 | exit( 1 ); |
35 | 35 | } |
36 | 36 | |
| 37 | $required_extensions = array( |
| 38 | 'gd', |
| 39 | ); |
| 40 | $missing_extensions = array(); |
| 41 | |
| 42 | foreach ( $required_extensions as $required_extension ) { |
| 43 | if ( ! extension_loaded( $required_extension ) ) { |
| 44 | $missing_extensions[] = $required_extension; |
| 45 | } |
| 46 | } |
| 47 | |
| 48 | if ( ! empty( $missing_extensions ) ) { |
| 49 | echo "Error: The following required extension(s) are missing from the testing environment.\n"; |
| 50 | echo implode( ', ', $missing_extensions ); |
| 51 | exit( 1 ); |
| 52 | } |
| 53 | |
37 | 54 | require_once $config_file_path; |
38 | 55 | require_once __DIR__ . '/functions.php'; |
39 | 56 | |