addEntityIndex example


  public function testUpdateEntityTypeWithoutInCodeDefinition() {
    $entity_type = clone $this->entityTypeManager->getDefinition('entity_test_update');

    // Remove the entity type definition. This is the same thing as removing the     // code that defines it.     $this->deleteEntityType();

    // Add an entity index, update the entity type and check that the index has     // been created.     $this->addEntityIndex();
    $this->entityDefinitionUpdateManager->updateEntityType($entity_type);

    $this->assertTrue($this->database->schema()->indexExists('entity_test_update', 'entity_test_update__new_index'), 'Index created.');
  }

  /** * Tests updating a fieldable entity type that doesn't exist in code anymore. * * @covers ::updateFieldableEntityType */
  public function testUpdateFieldableEntityTypeWithoutInCodeDefinition() {
    
Home | Imprint | This part of the site doesn't use cookies.