You are here

public function SqlContentEntityStorageTest::providerTestGetRevisionTable in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/tests/Drupal/Tests/Core/Entity/Sql/SqlContentEntityStorageTest.php \Drupal\Tests\Core\Entity\Sql\SqlContentEntityStorageTest::providerTestGetRevisionTable()

Provides test data for testGetRevisionTable().

Return value

array[] An nested array where each inner array has the revision table to be returned by the mocked entity type as the first value and the expected return value of SqlContentEntityStorage::getRevisionTable() as the second value.

File

core/tests/Drupal/Tests/Core/Entity/Sql/SqlContentEntityStorageTest.php, line 196
Contains \Drupal\Tests\Core\Entity\Sql\SqlContentEntityStorageTest.

Class

SqlContentEntityStorageTest
@coversDefaultClass \Drupal\Core\Entity\Sql\SqlContentEntityStorage @group Entity

Namespace

Drupal\Tests\Core\Entity\Sql

Code

public function providerTestGetRevisionTable() {
  return array(
    // Test that the entity type's revision table is used, if provided.
    array(
      'entity_test_revision',
      'entity_test_revision',
    ),
    // Test that the storage falls back to the entity type ID with a
    // '_revision' suffix.
    array(
      NULL,
      'entity_test_revision',
    ),
  );
}