public function maybeRestoreDatabase(AfterScenarioScope $scope)
    {
        $db = $this->getWordpressParameter('database');
        if (! $db['restore_after_test']) {
            return;
        }

        $file = $this->getWordpress()->getSetting('database_backup_file');
        if (! $file) {
            return;
        }

        $this->importDatabase(['path' => $file]);
    }