Codeception\Module\WPDb::prepareSqlDumpFile PHP Method

prepareSqlDumpFile() private method

private prepareSqlDumpFile ( )
    private function prepareSqlDumpFile()
    {
        if ($this->config['dump'] && ($this->config['cleanup'] or $this->config['populate'])) {
            if (!file_exists(Configuration::projectDir() . $this->config['dump'])) {
                throw new ModuleConfigException(__CLASS__, "\nFile with dump doesn't exist.\n                    Please, check path for sql file: " . $this->config['dump']);
            }
            $sql = file_get_contents(Configuration::projectDir() . $this->config['dump']);
            $sql = preg_replace('%/\\*(?!!\\d+)(?:(?!\\*/).)*\\*/%s', "", $sql);
            if (empty($this->config['urlReplacement'])) {
                $sql = $this->replaceSiteDomainInSql($sql);
                $sql = $this->replaceSiteDomainInMultisiteSql($sql);
            }
            $this->sql = explode("\n", $sql);
        }
    }
WPDb