function EndOfTransactionQueriesTest::getStatementsForTable
Same name in other branches
- 9 core/tests/Drupal/KernelTests/Core/Cache/EndOfTransactionQueriesTest.php \Drupal\KernelTests\Core\Cache\EndOfTransactionQueriesTest::getStatementsForTable()
- 8.9.x core/tests/Drupal/KernelTests/Core/Cache/EndOfTransactionQueriesTest.php \Drupal\KernelTests\Core\Cache\EndOfTransactionQueriesTest::getStatementsForTable()
- 11.x core/tests/Drupal/KernelTests/Core/Cache/EndOfTransactionQueriesTest.php \Drupal\KernelTests\Core\Cache\EndOfTransactionQueriesTest::getStatementsForTable()
Filters statements by table name.
Parameters
string[] $statements: A list of query statements.
$table_name: The name of the table to filter by.
Return value
string[] Filtered statement list.
1 call to EndOfTransactionQueriesTest::getStatementsForTable()
- EndOfTransactionQueriesTest::testEntitySave in core/
tests/ Drupal/ KernelTests/ Core/ Cache/ EndOfTransactionQueriesTest.php - Tests an entity save.
File
-
core/
tests/ Drupal/ KernelTests/ Core/ Cache/ EndOfTransactionQueriesTest.php, line 161
Class
- EndOfTransactionQueriesTest
- Tests delaying of cache tag invalidation queries to the end of transactions.
Namespace
Drupal\KernelTests\Core\CacheCode
protected function getStatementsForTable(array $statements, $table_name) {
return array_filter($statements, function ($statement) use ($table_name) {
return $this->isStatementRelatedToTable($statement, $table_name);
});
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.