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

Breadcrumb

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

function TestDatabase::getLockFile

Gets the lock file path.

Parameters

int $lock_id: The test method lock ID.

Return value

string A file path to the symbolic link that prevents the lock ID being re-used.

2 calls to TestDatabase::getLockFile()
TestDatabase::getTestLock in core/lib/Drupal/Core/Test/TestDatabase.php
Generates a unique lock ID for the test method.
TestDatabase::releaseLock in core/lib/Drupal/Core/Test/TestDatabase.php
Releases a lock.

File

core/lib/Drupal/Core/Test/TestDatabase.php, line 147

Class

TestDatabase
Provides helper methods for interacting with the fixture database.

Namespace

Drupal\Core\Test

Code

protected function getLockFile(int $lock_id) : string {
    return FileSystem::getOsTemporaryDirectory() . '/test_' . $lock_id;
}

API Navigation

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