function TestSiteApplicationTest::getTestLockFile

Same name in this branch
  1. 11.x core/tests/Drupal/Tests/Scripts/TestSiteApplicationTest.php \Drupal\Tests\Scripts\TestSiteApplicationTest::getTestLockFile()
Same name in other branches
  1. 9 core/tests/Drupal/Tests/Scripts/TestSiteApplicationTest.php \Drupal\Tests\Scripts\TestSiteApplicationTest::getTestLockFile()
  2. 8.9.x core/tests/Drupal/Tests/Scripts/TestSiteApplicationTest.php \Drupal\Tests\Scripts\TestSiteApplicationTest::getTestLockFile()
  3. 10 core/tests/Drupal/Tests/Scripts/TestSiteApplicationTest.php \Drupal\Tests\Scripts\TestSiteApplicationTest::getTestLockFile()

Gets the lock file path.

Parameters

string $db_prefix: The prefix of the installed test site.

Return value

string The lock file path.

File

core/tests/Drupal/KernelTests/Scripts/TestSiteApplicationTest.php, line 310

Class

TestSiteApplicationTest
Tests core/scripts/test-site.php.

Namespace

Drupal\KernelTests\Scripts

Code

protected function getTestLockFile($db_prefix) : string {
    $lock_id = str_replace('test', '', $db_prefix);
    return FileSystem::getOsTemporaryDirectory() . '/test_' . $lock_id;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.