function TestDatabase::releaseAllTestLocks
Releases all test locks.
This should only be called once all the test fixtures have been cleaned up.
File
-
core/
lib/ Drupal/ Core/ Test/ TestDatabase.php, line 124
Class
- TestDatabase
- Provides helper methods for interacting with the fixture database.
Namespace
Drupal\Core\TestCode
public static function releaseAllTestLocks() : void {
$tmp = FileSystem::getOsTemporaryDirectory();
$dir = dir($tmp);
while (($entry = $dir->read()) !== FALSE) {
if ($entry === '.' || $entry === '..') {
continue;
}
$entry_path = $tmp . '/' . $entry;
if (preg_match('/^test_\\d+/', $entry) && is_link($entry_path)) {
unlink($entry_path);
}
}
}