function EntityTypeTest::testGetSingularLabel

Tests get singular label.

@legacy-covers ::getSingularLabel

File

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

Class

EntityTypeTest
Tests Drupal\Core\Entity\EntityType.

Namespace

Drupal\Tests\Core\Entity

Code

public function testGetSingularLabel() : void {
  $translatable_label = new TranslatableMarkup('entity test singular', [], [], $this->getStringTranslationStub());
  $entity_type = $this->setUpEntityType([
    'label_singular' => $translatable_label,
  ]);
  $entity_type->setStringTranslation($this->getStringTranslationStub());
  $this->assertEquals('entity test singular', $entity_type->getSingularLabel());
}

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