Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. EnvironmentCleaner.php

function EnvironmentCleaner::cleanDatabase

Overrides EnvironmentCleanerInterface::cleanDatabase

File

core/lib/Drupal/Core/Test/EnvironmentCleaner.php, line 62

Class

EnvironmentCleaner
Helper class for cleaning test environments.

Namespace

Drupal\Core\Test

Code

public function cleanDatabase() : void {
    $count = $this->doCleanDatabase();
    if ($count > 0) {
        $this->output
            ->write('Leftover tables removed: ' . $count);
    }
    else {
        $this->output
            ->write('No leftover tables to remove.');
    }
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal