function TaxonomyLegacyTest::testTaxonomyTermView
@expectedDeprecation taxonomy_term_view() is deprecated in Drupal 8.7.0 and will be removed before Drupal 9.0.0. Use \Drupal::entityTypeManager()->getViewBuilder('taxonomy_term')->view() instead. See https://www.drupal.org/node/3033656 @expectedDeprecation taxonomy_term_view_multiple() is deprecated in Drupal 8.7.0 and will be removed before Drupal 9.0.0. Use \Drupal::entityTypeManager()->getViewBuilder('taxonomy_term')->viewMultiple() instead. See https://www.drupal.org/node/3033656
File
-
core/
modules/ taxonomy/ tests/ src/ Kernel/ TaxonomyLegacyTest.php, line 63
Class
- TaxonomyLegacyTest
- Tests legacy user functionality.
Namespace
Drupal\Tests\taxonomy\KernelCode
public function testTaxonomyTermView() {
$entity = $this->createTerm($this->createVocabulary());
$this->assertNotEmpty(taxonomy_term_view($entity));
$entities = [
$this->createTerm($this->createVocabulary()),
$this->createTerm($this->createVocabulary()),
];
$this->assertCount(4, taxonomy_term_view_multiple($entities));
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.