doTestEntityLanguageMethods example


class EntityTranslationTest extends EntityLanguageTestBase {

  /** * Tests language related methods of the Entity class. */
  public function testEntityLanguageMethods() {
    // All entity variations have to have the same results.     foreach (entity_test_entity_types() as $entity_type) {
      $this->doTestEntityLanguageMethods($entity_type);
    }
  }

  /** * Executes the entity language method tests for the given entity type. * * @param string $entity_type * The entity type to run the tests with. */
  protected function doTestEntityLanguageMethods($entity_type) {
    $langcode_key = $this->entityTypeManager->getDefinition($entity_type)->getKey('langcode');
    
Home | Imprint | This part of the site doesn't use cookies.