function EntityTypeTest::testGetBundleLabel
Same name in other branches
- 9 core/tests/Drupal/Tests/Core/Entity/EntityTypeTest.php \Drupal\Tests\Core\Entity\EntityTypeTest::testGetBundleLabel()
- 10 core/tests/Drupal/Tests/Core/Entity/EntityTypeTest.php \Drupal\Tests\Core\Entity\EntityTypeTest::testGetBundleLabel()
- 11.x core/tests/Drupal/Tests/Core/Entity/EntityTypeTest.php \Drupal\Tests\Core\Entity\EntityTypeTest::testGetBundleLabel()
Tests the ::getBundleLabel() method.
@covers ::getBundleLabel @dataProvider providerTestGetBundleLabel
File
-
core/
tests/ Drupal/ Tests/ Core/ Entity/ EntityTypeTest.php, line 426
Class
- EntityTypeTest
- @coversDefaultClass \Drupal\Core\Entity\EntityType @group Entity
Namespace
Drupal\Tests\Core\EntityCode
public function testGetBundleLabel($definition, $expected) {
$entity_type = $this->setUpEntityType($definition);
$entity_type->setStringTranslation($this->getStringTranslationStub());
$this->assertEquals($expected, $entity_type->getBundleLabel());
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.