function SqlContentEntityStorageSchemaTest::providerTestRequiresEntityStorageSchemaChanges

Data provider for ::testRequiresEntityStorageSchemaChanges().

File

core/tests/Drupal/Tests/Core/Entity/Sql/SqlContentEntityStorageSchemaTest.php, line 1237

Class

SqlContentEntityStorageSchemaTest
@coversDefaultClass \Drupal\Core\Entity\Sql\SqlContentEntityStorageSchema[[api-linebreak]] @group Entity

Namespace

Drupal\Tests\Core\Entity\Sql

Code

public static function providerTestRequiresEntityStorageSchemaChanges() : \Generator {
  // Case 1: No shared table changes should not require change.
  yield [
    FALSE,
    FALSE,
    FALSE,
  ];
  // Case 2: A change in the entity schema should result in required changes.
  yield [
    TRUE,
    TRUE,
    FALSE,
  ];
  // Case 3: Has shared table changes should result in required changes.
  yield [
    TRUE,
    FALSE,
    TRUE,
  ];
  // Case 4: Changing translation should result in required changes.
  yield [
    TRUE,
    FALSE,
    FALSE,
    'isTranslatable',
  ];
  // Case 5: Changing revisionable should result in required changes.
  yield [
    TRUE,
    FALSE,
    FALSE,
    'isRevisionable',
  ];
}

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