'Requires at least' ) ); /* * Gutenberg.php isn't loaded in the test environment. * * Read the file directly and use regex to extract the constant. */ preg_match( '/GUTENBERG_MINIMUM_WP_VERSION\', \'(.*?)\'/', file_get_contents( __DIR__ . '/../gutenberg.php' ), $matches ); $version_in_file = $matches[1]; $this->assertSame( $file_meta['RequiresWP'], $version_in_file, 'The minimum required WordPress version does not match the plugin header.' ); } }