function SqlContentEntityStorageSchemaTest::providerTestRequiresEntityDataMigration

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

File

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

Class

SqlContentEntityStorageSchemaTest
@coversDefaultClass \Drupal\Core\Entity\Sql\SqlContentEntityStorageSchema @group Entity

Namespace

Drupal\Tests\Core\Entity\Sql

Code

public static function providerTestRequiresEntityDataMigration() : \Generator {
    // Case 1: same storage class, ::hasData() === TRUE.
    (yield [
        SqlContentEntityStorageSchema::class,
        TRUE,
        TRUE,
        TRUE,
    ]);
    // Case 2: same storage class, ::hasData() === FALSE.
    (yield [
        SqlContentEntityStorageSchema::class,
        FALSE,
        TRUE,
        FALSE,
    ]);
    // Case 3: different storage class, original storage class does not exist.
    (yield [
        'bar',
        NULL,
        TRUE,
        TRUE,
    ]);
    // Case 4: different storage class, original storage class exists,
    // ::hasData() === TRUE.
    (yield [
        SqlContentEntityStorageSchemaTest::class,
        TRUE,
        TRUE,
        TRUE,
    ]);
    // Case 5: different storage class, original storage class exists,
    // ::hasData() === FALSE.
    (yield [
        SqlContentEntityStorageSchemaTest::class,
        FALSE,
        TRUE,
        FALSE,
    ]);
    // Case 6: same storage class, ::hasData() === TRUE, no structure changes.
    (yield [
        SqlContentEntityStorageSchema::class,
        TRUE,
        FALSE,
        FALSE,
    ]);
    // Case 7: different storage class, original storage class exists,
    // ::hasData() === TRUE, no structure changes.
    (yield [
        SqlContentEntityStorageSchemaTest::class,
        TRUE,
        FALSE,
        FALSE,
    ]);
}

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