protected function TaxonomyEntityIndexEntityTest::assertThatDisabledEntityTypesDoNotWriteToTheIndex in Taxonomy Entity Index 8
Test that disabled entity types don't write to the index.
Parameters
\Drupal\taxonomy\TermInterface[] $terms: Terms to reference.
1 call to TaxonomyEntityIndexEntityTest::assertThatDisabledEntityTypesDoNotWriteToTheIndex()
- TaxonomyEntityIndexEntityTest::testWritingToIndexTable in tests/
src/ Kernel/ TaxonomyEntityIndexEntityTest.php - Tests operations that insert/update/delete to the index table.
File
- tests/
src/ Kernel/ TaxonomyEntityIndexEntityTest.php, line 88
Class
- TaxonomyEntityIndexEntityTest
- Defines a class for testing basic functionality of taxonomy_entity_index.
Namespace
Drupal\Tests\taxonomy_entity_index\KernelCode
protected function assertThatDisabledEntityTypesDoNotWriteToTheIndex(array $terms) {
// Create a node with a term, should not write to the index as nodes are not
// enabled.
$this
->createNode([
'type' => 'page',
'termz' => $terms,
]);
$this
->assertCount(0, $this->database
->select('taxonomy_entity_index', 'tei')
->fields('tei')
->execute()
->fetchAll());
}