diff --git a/core/modules/taxonomy/src/Tests/TermTest.php b/core/modules/taxonomy/src/Tests/TermTest.php index 457c903..430a513 100644 --- a/core/modules/taxonomy/src/Tests/TermTest.php +++ b/core/modules/taxonomy/src/Tests/TermTest.php @@ -601,7 +601,7 @@ function testReSavingTags() { * Test taxonomy_term query alter tag. */ public function testTermQueryAlter() { - \Drupal::moduleHandler()->install(array('taxonomy_crud')); + \Drupal::moduleHandler()->install(array('taxonomy_query')); // Create some terms. $term_access = $this->createTerm($this->vocabulary, array('name' => 'term with access')); diff --git a/core/modules/taxonomy/tests/modules/taxonomy_crud/taxonomy_crud.module b/core/modules/taxonomy/tests/modules/taxonomy_crud/taxonomy_crud.module index 9954e72..442ca09 100644 --- a/core/modules/taxonomy/tests/modules/taxonomy_crud/taxonomy_crud.module +++ b/core/modules/taxonomy/tests/modules/taxonomy_crud/taxonomy_crud.module @@ -5,18 +5,9 @@ * Provides hook implementations for testing purposes. */ -use Drupal\Core\Database\Query\AlterableInterface; - /** * Implements hook_ENTITY_TYPE_presave() for taxonomy_vocabulary entities. */ function taxonomy_crud_taxonomy_vocabulary_presave(\Drupal\taxonomy\VocabularyInterface $vocabulary) { $vocabulary->setThirdPartySetting('taxonomy_crud', 'foo', 'bar'); } - -/** - * Implements hook_query_TAG_alter() for taxonomy_term entities. - */ -function taxonomy_crud_query_taxonomy_term_load_multiple_alter(AlterableInterface $query) { - $query->condition('base.tid', array(3, 4), 'NOT IN'); -} diff --git a/core/modules/taxonomy/tests/modules/taxonomy_query/taxonomy_query.info b/core/modules/taxonomy/tests/modules/taxonomy_query/taxonomy_query.info new file mode 100644 index 0000000..0b13e18 --- /dev/null +++ b/core/modules/taxonomy/tests/modules/taxonomy_query/taxonomy_query.info @@ -0,0 +1,8 @@ +name: 'Taxonomy query tests' +type: module +description: 'Provides query alter for terms.' +package: Testing +version: VERSION +core: 8.x +dependencies: +- taxonomy diff --git a/core/modules/taxonomy/tests/modules/taxonomy_query/taxonomy_query.module b/core/modules/taxonomy/tests/modules/taxonomy_query/taxonomy_query.module new file mode 100644 index 0000000..da5828a --- /dev/null +++ b/core/modules/taxonomy/tests/modules/taxonomy_query/taxonomy_query.module @@ -0,0 +1,15 @@ +condition('base.tid', array(3, 4), 'NOT IN'); +}