protected function defineGlobals()
    {
        $wpRootFolder = $this->getWpRootFolder();

        // load an extra config file if any
        $this->loadConfigFile();

        $constants = [
            // by default install WordPress in an isolated process
            'WPCEPT_ISOLATED_INSTALL' => $this->requiresIsolatedInstallation(),
            'ABSPATH'                 => $wpRootFolder,
            'DB_NAME'                 => $this->config['dbName'],
            'DB_USER'                 => $this->config['dbUser'],
            'DB_PASSWORD'             => $this->config['dbPassword'],
            'DB_HOST'                 => $this->config['dbHost'],
            'DB_CHARSET'              => $this->config['dbCharset'],
            'DB_COLLATE'              => $this->config['dbCollate'],
            'WP_TESTS_TABLE_PREFIX'   => $this->config['tablePrefix'],
            'WP_TESTS_DOMAIN'         => $this->config['domain'],
            'WP_TESTS_EMAIL'          => $this->config['adminEmail'],
            'WP_TESTS_TITLE'          => $this->config['title'],
            'WP_PHP_BINARY'           => $this->config['phpBinary'],
            'WPLANG'                  => $this->config['language'],
            'WP_DEBUG'                => $this->config['wpDebug'],
            'WP_TESTS_MULTISITE'      => $this->config['multisite'],
        ];

        foreach ($constants as $key => $value) {
            if (!defined($key)) {
                define($key, $value);
            }
        }

        if (!defined('WP_PLUGIN_DIR') && !empty($this->config['pluginsFolder'])) {
            define('WP_PLUGIN_DIR', $this->getPluginsFolder());
        }
    }