protected static function EndOfTransactionQueriesTest::statementToTableName in Drupal 10
Same name and namespace in other branches
- 8 core/tests/Drupal/KernelTests/Core/Cache/EndOfTransactionQueriesTest.php \Drupal\KernelTests\Core\Cache\EndOfTransactionQueriesTest::statementToTableName()
- 9 core/tests/Drupal/KernelTests/Core/Cache/EndOfTransactionQueriesTest.php \Drupal\KernelTests\Core\Cache\EndOfTransactionQueriesTest::statementToTableName()
Returns the table name for a statement.
Parameters
string $statement: The query statement.
Return value
string|null The name of the table or NULL if none was found.
File
- core/
tests/ Drupal/ KernelTests/ Core/ Cache/ EndOfTransactionQueriesTest.php, line 166
Class
- EndOfTransactionQueriesTest
- Tests that cache tag invalidation queries are delayed to the end of transactions.
Namespace
Drupal\KernelTests\Core\CacheCode
protected static function statementToTableName($statement) {
if (preg_match('/.*\\{([^\\}]+)\\}.*/', $statement, $matches)) {
return $matches[1];
}
else {
return NULL;
}
}