function SqlContentEntityStorageSchemaTest::providerTestRequiresEntityStorageSchemaChanges

Same name and namespace in other branches
  1. 9 core/tests/Drupal/Tests/Core/Entity/Sql/SqlContentEntityStorageSchemaTest.php \Drupal\Tests\Core\Entity\Sql\SqlContentEntityStorageSchemaTest::providerTestRequiresEntityStorageSchemaChanges()
  2. 8.9.x core/tests/Drupal/Tests/Core/Entity/Sql/SqlContentEntityStorageSchemaTest.php \Drupal\Tests\Core\Entity\Sql\SqlContentEntityStorageSchemaTest::providerTestRequiresEntityStorageSchemaChanges()
  3. 10 core/tests/Drupal/Tests/Core/Entity/Sql/SqlContentEntityStorageSchemaTest.php \Drupal\Tests\Core\Entity\Sql\SqlContentEntityStorageSchemaTest::providerTestRequiresEntityStorageSchemaChanges()

Data provider for ::testRequiresEntityStorageSchemaChanges().

File

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

Class

SqlContentEntityStorageSchemaTest
@coversDefaultClass <a href="/api/drupal/core%21lib%21Drupal%21Core%21Entity%21Sql%21SqlContentEntityStorageSchema.php/class/SqlContentEntityStorageSchema/11.x" title="Defines a schema handler that supports revisionable, translatable entities." class="local">\Drupal\Core\Entity\Sql\SqlContentEntityStorageSchema</a> @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.