function EntityTypeTest::testGetCollectionLabel

@covers ::getCollectionLabel

File

core/tests/Drupal/Tests/Core/Entity/EntityTypeTest.php, line 346

Class

EntityTypeTest
@coversDefaultClass \Drupal\Core\Entity\EntityType[[api-linebreak]] @group Entity

Namespace

Drupal\Tests\Core\Entity

Code

public function testGetCollectionLabel() {
  $translatable_label = new TranslatableMarkup('Entity test collection', [], [], $this->getStringTranslationStub());
  $entity_type = $this->setUpEntityType([
    'label_collection' => $translatable_label,
  ]);
  $entity_type->setStringTranslation($this->getStringTranslationStub());
  $this->assertEquals('Entity test collection', $entity_type->getCollectionLabel());
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.