Chris@18: installConfig(['filter']); Chris@18: $this->installEntitySchema('taxonomy_term'); Chris@18: } Chris@18: Chris@18: /** Chris@18: * @expectedDeprecation taxonomy_term_load_multiple() is deprecated in Drupal 8.0.0 and will be removed before Drupal 9.0.0. Use \Drupal\taxonomy\Entity\Term::loadMultiple(). See https://www.drupal.org/node/2266845 Chris@18: * @expectedDeprecation taxonomy_vocabulary_load_multiple() is deprecated in Drupal 8.0.0 and will be removed before Drupal 9.0.0. Use \Drupal\taxonomy\Entity\Vocabulary::loadMultiple(). See https://www.drupal.org/node/2266845 Chris@18: * @expectedDeprecation taxonomy_term_load() is deprecated in Drupal 8.0.0 and will be removed before Drupal 9.0.0. Use \Drupal\taxonomy\Entity\Term::load(). See https://www.drupal.org/node/2266845 Chris@18: * @expectedDeprecation taxonomy_vocabulary_load() is deprecated in Drupal 8.0.0 and will be removed before Drupal 9.0.0. Use \Drupal\taxonomy\Entity\Vocabulary::load(). See https://www.drupal.org/node/2266845 Chris@18: */ Chris@18: public function testEntityLegacyCode() { Chris@18: $this->assertCount(0, taxonomy_term_load_multiple()); Chris@18: $this->assertCount(0, taxonomy_vocabulary_load_multiple()); Chris@18: $this->createTerm($this->createVocabulary()); Chris@18: $this->assertCount(1, taxonomy_term_load_multiple()); Chris@18: $this->assertCount(1, taxonomy_vocabulary_load_multiple()); Chris@18: $vocab = $this->createVocabulary(); Chris@18: $this->createTerm($vocab); Chris@18: $this->createTerm($vocab); Chris@18: $this->assertCount(3, taxonomy_term_load_multiple()); Chris@18: $this->assertCount(2, taxonomy_vocabulary_load_multiple()); Chris@18: Chris@18: $this->assertNull(taxonomy_term_load(3000)); Chris@18: $this->assertInstanceOf(TermInterface::class, taxonomy_term_load(1)); Chris@18: $this->assertNull(taxonomy_vocabulary_load('not_a_vocab')); Chris@18: $this->assertInstanceOf(VocabularyInterface::class, taxonomy_vocabulary_load($vocab->id())); Chris@18: } Chris@18: Chris@18: }