function TestRun::getDatabasePrefix
Same name in other branches
- 10 core/lib/Drupal/Core/Test/TestRun.php \Drupal\Core\Test\TestRun::getDatabasePrefix()
Gets the test database prefix.
Return value
string The database prefix.
File
-
core/
lib/ Drupal/ Core/ Test/ TestRun.php, line 99
Class
- TestRun
- Implements an object that tracks execution of a test run.
Namespace
Drupal\Core\TestCode
public function getDatabasePrefix() : string {
if (is_null($this->databasePrefix)) {
$state = $this->testRunResultsStorage
->getCurrentTestRunState($this);
$this->databasePrefix = $state['db_prefix'];
$this->testClass = $state['test_class'];
}
return $this->databasePrefix;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.