diff --git a/core/includes/entity.inc b/core/includes/entity.inc index bfefff5..6f546b3 100644 --- a/core/includes/entity.inc +++ b/core/includes/entity.inc @@ -176,13 +176,13 @@ function entity_load_by_uuid($entity_type_id, $uuid) { * * The actual loading is done through a class that has to implement the * Drupal\Core\Entity\EntityStorageInterface interface. By default, - * Drupal\Core\Entity\ContentEntityDatabaseStorage is used for content entities + * Drupal\Core\Entity\SqlContentEntityStorage is used for content entities * and Drupal\Core\Config\Entity\ConfigEntityStorage for config entities. Entity * types can specify that a different class should be used by setting the * "controllers['storage']" key in the entity plugin annotation. These classes * can either implement the Drupal\Core\Entity\EntityStorageInterface * interface, or, most commonly, extend the - * Drupal\Core\Entity\ContentEntityDatabaseStorage class. + * Drupal\Core\Entity\SqlContentEntityStorage class. * See Drupal\node\Entity\Node and Drupal\node\NodeStorage * for an example. * diff --git a/core/lib/Drupal/Core/Entity/EntityStorageInterface.php b/core/lib/Drupal/Core/Entity/EntityStorageInterface.php index 32867f4..2bd29c5 100644 --- a/core/lib/Drupal/Core/Entity/EntityStorageInterface.php +++ b/core/lib/Drupal/Core/Entity/EntityStorageInterface.php @@ -11,7 +11,7 @@ * Defines the interface for entity storage classes. * * For common default implementations, see - * \Drupal\Core\Entity\ContentEntityDatabaseStorage for content entities and + * \Drupal\Core\Entity\SqlContentEntityStorage for content entities and * \Drupal\Core\Config\Entity\ConfigEntityStorage for config entities. Those * implementations are used by default when the @ContentEntityType or * @ConfigEntityType annotations are used. diff --git a/core/lib/Drupal/Core/Entity/EntityTypeInterface.php b/core/lib/Drupal/Core/Entity/EntityTypeInterface.php index a1c1bc9..7e8662b 100644 --- a/core/lib/Drupal/Core/Entity/EntityTypeInterface.php +++ b/core/lib/Drupal/Core/Entity/EntityTypeInterface.php @@ -535,7 +535,7 @@ public function getBundleLabel(); /** * Returns the name of the entity's base table. * - * @todo Used by ContentEntityDatabaseStorage only. + * @todo Used by SqlContentEntityStorage only. * * @return string|null * The name of the entity's base table, or NULL if none exists. @@ -572,7 +572,7 @@ public function getConfigPrefix(); /** * Returns the name of the entity's revision data table. * - * @todo Used by ContentEntityDatabaseStorage only. + * @todo Used by SqlContentEntityStorage only. * * @return string|null * The name of the entity type's revision data table, or NULL if none @@ -583,7 +583,7 @@ public function getRevisionDataTable(); /** * Returns the name of the entity's revision table. * - * @todo Used by ContentEntityDatabaseStorage only. + * @todo Used by SqlContentEntityStorage only. * * @return string|null * The name of the entity type's revision table, or NULL if none exists. @@ -593,7 +593,7 @@ public function getRevisionTable(); /** * Returns the name of the entity's data table. * - * @todo Used by ContentEntityDatabaseStorage only. + * @todo Used by SqlContentEntityStorage only. * * @return string|null * The name of the entity type's data table, or NULL if none exists. diff --git a/core/lib/Drupal/Core/Entity/Schema/ContentEntitySchemaHandler.php b/core/lib/Drupal/Core/Entity/Schema/ContentEntitySchemaHandler.php index 4f30d47..df307dc 100644 --- a/core/lib/Drupal/Core/Entity/Schema/ContentEntitySchemaHandler.php +++ b/core/lib/Drupal/Core/Entity/Schema/ContentEntitySchemaHandler.php @@ -7,7 +7,7 @@ namespace Drupal\Core\Entity\Schema; -use Drupal\Core\Entity\ContentEntityDatabaseStorage; +use Drupal\Core\Entity\SqlContentEntityStorage; use Drupal\Core\Entity\ContentEntityTypeInterface; use Drupal\Core\Entity\EntityManagerInterface; @@ -33,7 +33,7 @@ class ContentEntitySchemaHandler implements EntitySchemaHandlerInterface { /** * The storage object for the given entity type. * - * @var \Drupal\Core\Entity\ContentEntityDatabaseStorage + * @var \Drupal\Core\Entity\SqlContentEntityStorage */ protected $storage; @@ -51,10 +51,10 @@ class ContentEntitySchemaHandler implements EntitySchemaHandlerInterface { * The entity manager. * @param \Drupal\Core\Entity\ContentEntityTypeInterface $entity_type * The entity type. - * @param \Drupal\Core\Entity\ContentEntityDatabaseStorage $storage + * @param \Drupal\Core\Entity\SqlContentEntityStorage $storage * The storage of the entity type. This must be an SQL-based storage. */ - public function __construct(EntityManagerInterface $entity_manager, ContentEntityTypeInterface $entity_type, ContentEntityDatabaseStorage $storage) { + public function __construct(EntityManagerInterface $entity_manager, ContentEntityTypeInterface $entity_type, SqlContentEntityStorage $storage) { $this->entityType = $entity_type; $this->fieldStorageDefinitions = $entity_manager->getFieldStorageDefinitions($entity_type->id()); $this->storage = $storage; diff --git a/core/lib/Drupal/Core/Entity/ContentEntityDatabaseStorage.php b/core/lib/Drupal/Core/Entity/SqlContentEntityStorage.php similarity index 99% rename from core/lib/Drupal/Core/Entity/ContentEntityDatabaseStorage.php rename to core/lib/Drupal/Core/Entity/SqlContentEntityStorage.php index 5969aae..269ec75 100644 --- a/core/lib/Drupal/Core/Entity/ContentEntityDatabaseStorage.php +++ b/core/lib/Drupal/Core/Entity/SqlContentEntityStorage.php @@ -2,7 +2,7 @@ /** * @file - * Contains \Drupal\Core\Entity\ContentEntityDatabaseStorage. + * Contains \Drupal\Core\Entity\SqlContentEntityStorage. */ namespace Drupal\Core\Entity; @@ -31,12 +31,12 @@ * The class uses \Drupal\Core\Entity\Schema\ContentEntitySchemaHandler * internally in order to automatically generate the database schema based on * the defined base fields. Entity types can override - * ContentEntityDatabaseStorage::getSchema() to customize the generated + * SqlContentEntityStorage::getSchema() to customize the generated * schema; e.g., to add additional indexes. * * @ingroup entity_api */ -class ContentEntityDatabaseStorage extends ContentEntityStorageBase implements SqlEntityStorageInterface { +class SqlContentEntityStorage extends ContentEntityStorageBase implements SqlEntityStorageInterface { /** * The mapping of field columns to SQL tables. @@ -141,7 +141,7 @@ public function getFieldStorageDefinitions() { } /** - * Constructs a ContentEntityDatabaseStorage object. + * Constructs a SqlContentEntityStorage object. * * @param \Drupal\Core\Entity\EntityTypeInterface $entity_type * The entity type definition. diff --git a/core/modules/aggregator/src/FeedStorage.php b/core/modules/aggregator/src/FeedStorage.php index da784f5..c36882d 100644 --- a/core/modules/aggregator/src/FeedStorage.php +++ b/core/modules/aggregator/src/FeedStorage.php @@ -8,15 +8,15 @@ namespace Drupal\aggregator; use Drupal\aggregator\FeedInterface; -use Drupal\Core\Entity\ContentEntityDatabaseStorage; +use Drupal\Core\Entity\SqlContentEntityStorage; /** * Controller class for aggregator's feeds. * - * This extends the Drupal\Core\Entity\ContentEntityDatabaseStorage class, + * This extends the Drupal\Core\Entity\SqlContentEntityStorage class, * adding required special handling for feed entities. */ -class FeedStorage extends ContentEntityDatabaseStorage implements FeedStorageInterface { +class FeedStorage extends SqlContentEntityStorage implements FeedStorageInterface { /** * {@inheritdoc} diff --git a/core/modules/aggregator/src/ItemStorage.php b/core/modules/aggregator/src/ItemStorage.php index f2b4aa6..566af74 100644 --- a/core/modules/aggregator/src/ItemStorage.php +++ b/core/modules/aggregator/src/ItemStorage.php @@ -9,15 +9,15 @@ use Drupal\aggregator\Entity\Item; use Drupal\Core\Entity\Query\QueryInterface; -use Drupal\Core\Entity\ContentEntityDatabaseStorage; +use Drupal\Core\Entity\SqlContentEntityStorage; /** * Controller class for aggregators items. * - * This extends the Drupal\Core\Entity\ContentEntityDatabaseStorage class, + * This extends the Drupal\Core\Entity\SqlContentEntityStorage class, * adding required special handling for feed item entities. */ -class ItemStorage extends ContentEntityDatabaseStorage implements ItemStorageInterface { +class ItemStorage extends SqlContentEntityStorage implements ItemStorageInterface { /** * {@inheritdoc} diff --git a/core/modules/block_content/src/BlockContentStorage.php b/core/modules/block_content/src/BlockContentStorage.php index b98a861..0568726 100644 --- a/core/modules/block_content/src/BlockContentStorage.php +++ b/core/modules/block_content/src/BlockContentStorage.php @@ -7,12 +7,12 @@ namespace Drupal\block_content; -use Drupal\Core\Entity\ContentEntityDatabaseStorage; +use Drupal\Core\Entity\SqlContentEntityStorage; /** * Provides storage for the 'block_content' entity type. */ -class BlockContentStorage extends ContentEntityDatabaseStorage { +class BlockContentStorage extends SqlContentEntityStorage { /** * {@inheritdoc} diff --git a/core/modules/comment/src/CommentStorage.php b/core/modules/comment/src/CommentStorage.php index 9639d59..93e6acd 100644 --- a/core/modules/comment/src/CommentStorage.php +++ b/core/modules/comment/src/CommentStorage.php @@ -13,17 +13,17 @@ use Drupal\Core\Entity\ContentEntityInterface; use Drupal\Core\Entity\EntityManagerInterface; use Drupal\Core\Entity\EntityTypeInterface; -use Drupal\Core\Entity\ContentEntityDatabaseStorage; +use Drupal\Core\Entity\SqlContentEntityStorage; use Drupal\Core\Session\AccountInterface; use Symfony\Component\DependencyInjection\ContainerInterface; /** * Defines the controller class for comments. * - * This extends the Drupal\Core\Entity\ContentEntityDatabaseStorage class, + * This extends the Drupal\Core\Entity\SqlContentEntityStorage class, * adding required special handling for comment entities. */ -class CommentStorage extends ContentEntityDatabaseStorage implements CommentStorageInterface { +class CommentStorage extends SqlContentEntityStorage implements CommentStorageInterface { /** * The current user. diff --git a/core/modules/contact/tests/modules/contact_storage_test/contact_storage_test.module b/core/modules/contact/tests/modules/contact_storage_test/contact_storage_test.module index 3ef9d22..8166680b 100644 --- a/core/modules/contact/tests/modules/contact_storage_test/contact_storage_test.module +++ b/core/modules/contact/tests/modules/contact_storage_test/contact_storage_test.module @@ -18,7 +18,7 @@ function contact_storage_test_entity_base_field_info(\Drupal\Core\Entity\EntityT ->setDescription(t('The message ID.')) ->setReadOnly(TRUE) // Explicitly set this to 'contact' so that - // ContentEntityDatabaseStorage::usesDedicatedTable() doesn't attempt to + // SqlContentEntityStorage::usesDedicatedTable() doesn't attempt to // put the ID in a dedicated table. // @todo Remove when https://www.drupal.org/node/1498720 is in. ->setProvider('contact') diff --git a/core/modules/content_translation/src/Tests/ContentTranslationTestBase.php b/core/modules/content_translation/src/Tests/ContentTranslationTestBase.php index 81de3aa..61bacac 100644 --- a/core/modules/content_translation/src/Tests/ContentTranslationTestBase.php +++ b/core/modules/content_translation/src/Tests/ContentTranslationTestBase.php @@ -7,7 +7,7 @@ namespace Drupal\content_translation\Tests; -use Drupal\Core\Entity\ContentEntityDatabaseStorage; +use Drupal\Core\Entity\SqlContentEntityStorage; use Drupal\Core\Language\Language; use Drupal\simpletest\WebTestBase; @@ -218,7 +218,7 @@ protected function createEntity($values, $langcode, $bundle_name = NULL) { $entity_values[$bundle_key] = $bundle_name ?: $this->bundle; } $controller = $this->container->get('entity.manager')->getStorage($this->entityTypeId); - if (!($controller instanceof ContentEntityDatabaseStorage)) { + if (!($controller instanceof SqlContentEntityStorage)) { foreach ($values as $property => $value) { if (is_array($value)) { $entity_values[$property] = array($langcode => $value); diff --git a/core/modules/field/field.views.inc b/core/modules/field/field.views.inc index 95e360e..3f14b19 100644 --- a/core/modules/field/field.views.inc +++ b/core/modules/field/field.views.inc @@ -6,7 +6,7 @@ */ use Drupal\Component\Utility\NestedArray; -use Drupal\Core\Entity\ContentEntityDatabaseStorage; +use Drupal\Core\Entity\SqlContentEntityStorage; use Drupal\Core\Entity\EntityStorageInterface; use Drupal\field\FieldStorageConfigInterface; use Drupal\field\FieldInstanceConfigInterface; @@ -63,7 +63,7 @@ function field_views_data_alter(&$data) { * @param \Drupal\field\FieldStorageConfigInterface $field_storage * The field storage definition. * - * @return \Drupal\Core\Entity\ContentEntityDatabaseStorage + * @return \Drupal\Core\Entity\SqlContentEntityStorage * Returns the entity type storage if supported. */ function _field_views_get_entity_type_storage(FieldStorageConfigInterface $field_storage) { @@ -71,7 +71,7 @@ function _field_views_get_entity_type_storage(FieldStorageConfigInterface $field $entity_manager = \Drupal::entityManager(); if ($entity_manager->hasDefinition($field_storage->getTargetEntityTypeId())) { $storage = $entity_manager->getStorage($field_storage->getTargetEntityTypeId()); - $result = $storage instanceof ContentEntityDatabaseStorage ? $storage : FALSE; + $result = $storage instanceof SqlContentEntityStorage ? $storage : FALSE; } return $result; } diff --git a/core/modules/field/src/Tests/FieldDataCountTest.php b/core/modules/field/src/Tests/FieldDataCountTest.php index 66e60db..36c485c 100644 --- a/core/modules/field/src/Tests/FieldDataCountTest.php +++ b/core/modules/field/src/Tests/FieldDataCountTest.php @@ -7,7 +7,7 @@ namespace Drupal\field\Tests; -use Drupal\Core\Entity\ContentEntityDatabaseStorage; +use Drupal\Core\Entity\SqlContentEntityStorage; /** * Tests counting field data records and the hasData() method on @@ -74,7 +74,7 @@ public function testEntityCountAndHasData() { } $storage = \Drupal::entityManager()->getStorage('entity_test'); - if ($storage instanceof ContentEntityDatabaseStorage) { + if ($storage instanceof SqlContentEntityStorage) { // Count the actual number of rows in the field table. $table_mapping = $storage->getTableMapping(); $field_table_name = $table_mapping->getDedicatedDataTableName($field_storage); diff --git a/core/modules/file/src/FileStorage.php b/core/modules/file/src/FileStorage.php index 93dae42..10d4e15 100644 --- a/core/modules/file/src/FileStorage.php +++ b/core/modules/file/src/FileStorage.php @@ -7,12 +7,12 @@ namespace Drupal\file; -use Drupal\Core\Entity\ContentEntityDatabaseStorage; +use Drupal\Core\Entity\SqlContentEntityStorage; /** * File storage for files. */ -class FileStorage extends ContentEntityDatabaseStorage implements FileStorageInterface { +class FileStorage extends SqlContentEntityStorage implements FileStorageInterface { /** * {@inheritdoc} diff --git a/core/modules/menu_link_content/src/Entity/MenuLinkContent.php b/core/modules/menu_link_content/src/Entity/MenuLinkContent.php index 2d41ba8..106fc7a 100644 --- a/core/modules/menu_link_content/src/Entity/MenuLinkContent.php +++ b/core/modules/menu_link_content/src/Entity/MenuLinkContent.php @@ -21,7 +21,7 @@ * id = "menu_link_content", * label = @Translation("Custom menu link"), * handlers = { - * "storage" = "Drupal\Core\Entity\ContentEntityDatabaseStorage", + * "storage" = "Drupal\Core\Entity\SqlContentEntityStorage", * "access" = "Drupal\menu_link_content\MenuLinkContentAccessControlHandler", * "form" = { * "default" = "Drupal\menu_link_content\Form\MenuLinkContentForm", diff --git a/core/modules/node/src/NodeStorage.php b/core/modules/node/src/NodeStorage.php index 86cf982..ded92b6 100644 --- a/core/modules/node/src/NodeStorage.php +++ b/core/modules/node/src/NodeStorage.php @@ -7,7 +7,7 @@ namespace Drupal\node; -use Drupal\Core\Entity\ContentEntityDatabaseStorage; +use Drupal\Core\Entity\SqlContentEntityStorage; use Drupal\Core\Session\AccountInterface; use Drupal\Core\Language\LanguageInterface; @@ -17,7 +17,7 @@ * This extends the base storage class, adding required special handling for * node entities. */ -class NodeStorage extends ContentEntityDatabaseStorage implements NodeStorageInterface { +class NodeStorage extends SqlContentEntityStorage implements NodeStorageInterface { /** * {@inheritdoc} diff --git a/core/modules/system/entity.api.php b/core/modules/system/entity.api.php index f4bbfd2..719e243 100644 --- a/core/modules/system/entity.api.php +++ b/core/modules/system/entity.api.php @@ -19,7 +19,7 @@ * entity storage classes; see the * @link entity_api Entity API topic @endlink for more information. Most * entities use or extend the default classes: - * \Drupal\Core\Entity\ContentEntityDatabaseStorage for content entities, and + * \Drupal\Core\Entity\SqlContentEntityStorage for content entities, and * \Drupal\Core\Config\Entity\ConfigEntityStorage for configuration entities. * For these entities, there is a set of hooks that is invoked for each * CRUD operation, which module developers can implement to affect these @@ -306,7 +306,7 @@ * checkAccess() and checkCreateAccess() methods, not access(). * - storage: A class implementing * \Drupal\Core\Entity\EntityStorageInterface. If not specified, content - * entities will use \Drupal\Core\Entity\ContentEntityDatabaseStorage, and + * entities will use \Drupal\Core\Entity\SqlContentEntityStorage, and * config entities will use \Drupal\Core\Config\Entity\ConfigEntityStorage. * You can extend one of these classes to provide custom behavior. * - views_data: A class implementing \Drupal\views\EntityViewsDataInterface diff --git a/core/modules/system/src/Tests/Entity/FieldSqlStorageTest.php b/core/modules/system/src/Tests/Entity/FieldSqlStorageTest.php index d3df71c..8ec277c 100644 --- a/core/modules/system/src/Tests/Entity/FieldSqlStorageTest.php +++ b/core/modules/system/src/Tests/Entity/FieldSqlStorageTest.php @@ -8,7 +8,7 @@ namespace Drupal\system\Tests\Entity; use Drupal\Core\Database\Database; -use Drupal\Core\Entity\ContentEntityDatabaseStorage; +use Drupal\Core\Entity\SqlContentEntityStorage; use Drupal\Core\Entity\Exception\FieldStorageDefinitionUpdateForbiddenException; use Drupal\field\Entity\FieldStorageConfig; @@ -466,7 +466,7 @@ function testFieldSqlStorageForeignKeys() { $this->assertEqual($schema['foreign keys'][$foreign_key_name]['columns'][$foreign_key_name], 'id', 'Foreign key column name modified after update'); // Verify the SQL schema. - $schemas = ContentEntityDatabaseStorage::_fieldSqlSchema($field_storage); + $schemas = SqlContentEntityStorage::_fieldSqlSchema($field_storage); $schema = $schemas[$this->table_mapping->getDedicatedDataTableName($field_storage)]; $this->assertEqual(count($schema['foreign keys']), 1, 'There is 1 foreign key in the schema'); $foreign_key = reset($schema['foreign keys']); diff --git a/core/modules/taxonomy/src/TermStorage.php b/core/modules/taxonomy/src/TermStorage.php index 345921c..19afed9 100644 --- a/core/modules/taxonomy/src/TermStorage.php +++ b/core/modules/taxonomy/src/TermStorage.php @@ -7,14 +7,14 @@ namespace Drupal\taxonomy; -use Drupal\Core\Entity\ContentEntityDatabaseStorage; +use Drupal\Core\Entity\SqlContentEntityStorage; use Drupal\Core\Entity\EntityInterface; use Drupal\Core\Entity\Query\QueryInterface; /** * Defines a Controller class for taxonomy terms. */ -class TermStorage extends ContentEntityDatabaseStorage implements TermStorageInterface { +class TermStorage extends SqlContentEntityStorage implements TermStorageInterface { /** * {@inheritdoc} diff --git a/core/modules/taxonomy/taxonomy.module b/core/modules/taxonomy/taxonomy.module index d58064d..54781a5 100644 --- a/core/modules/taxonomy/taxonomy.module +++ b/core/modules/taxonomy/taxonomy.module @@ -6,7 +6,7 @@ */ use Drupal\Component\Utility\Tags; -use Drupal\Core\Entity\ContentEntityDatabaseStorage; +use Drupal\Core\Entity\SqlContentEntityStorage; use Drupal\Core\Entity\EntityInterface; use Drupal\Core\Form\FormStateInterface; use Drupal\Core\Render\Element; @@ -756,7 +756,7 @@ function taxonomy_node_insert(EntityInterface $node) { function taxonomy_build_node_index($node) { // We maintain a denormalized table of term/node relationships, containing // only data for current, published nodes. - if (!\Drupal::config('taxonomy.settings')->get('maintain_index_table') || !(\Drupal::entityManager()->getStorage('node') instanceof ContentEntityDatabaseStorage)) { + if (!\Drupal::config('taxonomy.settings')->get('maintain_index_table') || !(\Drupal::entityManager()->getStorage('node') instanceof SqlContentEntityStorage)) { return; } diff --git a/core/modules/user/src/UserStorage.php b/core/modules/user/src/UserStorage.php index 65209b8..d6cb7b9 100644 --- a/core/modules/user/src/UserStorage.php +++ b/core/modules/user/src/UserStorage.php @@ -9,7 +9,7 @@ use Drupal\Core\Cache\CacheBackendInterface; use Drupal\Core\Database\Connection; -use Drupal\Core\Entity\ContentEntityDatabaseStorage; +use Drupal\Core\Entity\SqlContentEntityStorage; use Drupal\Core\Entity\EntityInterface; use Drupal\Core\Entity\EntityManagerInterface; use Drupal\Core\Entity\EntityTypeInterface; @@ -20,10 +20,10 @@ /** * Controller class for users. * - * This extends the Drupal\Core\Entity\ContentEntityDatabaseStorage class, + * This extends the Drupal\Core\Entity\SqlContentEntityStorage class, * adding required special handling for user objects. */ -class UserStorage extends ContentEntityDatabaseStorage implements UserStorageInterface { +class UserStorage extends SqlContentEntityStorage implements UserStorageInterface { /** * Provides the password hashing service object. diff --git a/core/modules/views/src/Tests/QueryGroupByTest.php b/core/modules/views/src/Tests/QueryGroupByTest.php index 05de2b7..a9b864f 100644 --- a/core/modules/views/src/Tests/QueryGroupByTest.php +++ b/core/modules/views/src/Tests/QueryGroupByTest.php @@ -33,7 +33,7 @@ class QueryGroupByTest extends ViewUnitTestBase { /** * The storage for the test entity type. * - * @var \Drupal\Core\Entity\ContentEntityDatabaseStorage + * @var \Drupal\Core\Entity\SqlContentEntityStorage */ public $storage; diff --git a/core/tests/Drupal/Tests/Core/Entity/ContentEntityDatabaseStorageTest.php b/core/tests/Drupal/Tests/Core/Entity/ContentEntityDatabaseStorageTest.php index fde0d84..e8920e6 100644 --- a/core/tests/Drupal/Tests/Core/Entity/ContentEntityDatabaseStorageTest.php +++ b/core/tests/Drupal/Tests/Core/Entity/ContentEntityDatabaseStorageTest.php @@ -8,7 +8,7 @@ namespace Drupal\Tests\Core\Entity; use Drupal\Core\Cache\CacheBackendInterface; -use Drupal\Core\Entity\ContentEntityDatabaseStorage; +use Drupal\Core\Entity\SqlContentEntityStorage; use Drupal\Core\Entity\EntityInterface; use Drupal\Core\Entity\EntityStorageInterface; use Drupal\Core\Field\BaseFieldDefinition; @@ -17,7 +17,7 @@ use Symfony\Component\DependencyInjection\ContainerBuilder; /** - * @coversDefaultClass \Drupal\Core\Entity\ContentEntityDatabaseStorage + * @coversDefaultClass \Drupal\Core\Entity\SqlContentEntityStorage * @group Entity */ class ContentEntityDatabaseStorageTest extends UnitTestCase { @@ -25,7 +25,7 @@ class ContentEntityDatabaseStorageTest extends UnitTestCase { /** * The content entity database storage used in this test. * - * @var \Drupal\Core\Entity\ContentEntityDatabaseStorage|\PHPUnit_Framework_MockObject_MockObject + * @var \Drupal\Core\Entity\SqlContentEntityStorage|\PHPUnit_Framework_MockObject_MockObject */ protected $entityStorage; @@ -106,13 +106,13 @@ protected function setUp() { } /** - * Tests ContentEntityDatabaseStorage::getBaseTable(). + * Tests SqlContentEntityStorage::getBaseTable(). * * @param string $base_table * The base table to be returned by the mocked entity type. * @param string $expected * The expected return value of - * ContentEntityDatabaseStorage::getBaseTable(). + * SqlContentEntityStorage::getBaseTable(). * * @covers ::__construct() * @covers ::getBaseTable() @@ -135,7 +135,7 @@ public function testGetBaseTable($base_table, $expected) { * @return array[] * An nested array where each inner array has the base table to be returned * by the mocked entity type as the first value and the expected return - * value of ContentEntityDatabaseStorage::getBaseTable() as the second + * value of SqlContentEntityStorage::getBaseTable() as the second * value. */ public function providerTestGetBaseTable() { @@ -148,13 +148,13 @@ public function providerTestGetBaseTable() { } /** - * Tests ContentEntityDatabaseStorage::getRevisionTable(). + * Tests SqlContentEntityStorage::getRevisionTable(). * * @param string $revision_table * The revision table to be returned by the mocked entity type. * @param string $expected * The expected return value of - * ContentEntityDatabaseStorage::getRevisionTable(). + * SqlContentEntityStorage::getRevisionTable(). * * @cover ::__construct() * @covers ::getRevisionTable() @@ -180,7 +180,7 @@ public function testGetRevisionTable($revision_table, $expected) { * @return 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 ContentEntityDatabaseStorage::getRevisionTable() as the + * return value of SqlContentEntityStorage::getRevisionTable() as the * second value. */ public function providerTestGetRevisionTable() { @@ -194,7 +194,7 @@ public function providerTestGetRevisionTable() { } /** - * Tests ContentEntityDatabaseStorage::getDataTable(). + * Tests SqlContentEntityStorage::getDataTable(). * * @cover ::__construct() * @covers ::getDataTable() @@ -213,13 +213,13 @@ public function testGetDataTable() { } /** - * Tests ContentEntityDatabaseStorage::getRevisionDataTable(). + * Tests SqlContentEntityStorage::getRevisionDataTable(). * * @param string $revision_data_table * The revision data table to be returned by the mocked entity type. * @param string $expected * The expected return value of - * ContentEntityDatabaseStorage::getRevisionDataTable(). + * SqlContentEntityStorage::getRevisionDataTable(). * * @cover ::__construct() * @covers ::getRevisionDataTable() @@ -252,7 +252,7 @@ public function testGetRevisionDataTable($revision_data_table, $expected) { * @return array[] * An nested array where each inner array has the revision data table to be * returned by the mocked entity type as the first value and the expected - * return value of ContentEntityDatabaseStorage::getRevisionDataTable() as + * return value of SqlContentEntityStorage::getRevisionDataTable() as * the second value. */ public function providerTestGetRevisionDataTable() { @@ -266,7 +266,7 @@ public function providerTestGetRevisionDataTable() { } /** - * Tests ContentEntityDatabaseStorage::getSchema(). + * Tests SqlContentEntityStorage::getSchema(). * * @covers ::__construct() * @covers ::getSchema() @@ -1014,7 +1014,7 @@ public function testFieldSqlSchemaForEntityWithStringIdentifier() { ->method('getSchema') ->will($this->returnValue($field_schema)); - $schema = ContentEntityDatabaseStorage::_fieldSqlSchema($field_storage); + $schema = SqlContentEntityStorage::_fieldSqlSchema($field_storage); // Make sure that the entity_id schema field if of type varchar. $this->assertEquals($schema['test_entity__test_field']['fields']['entity_id']['type'], 'varchar'); @@ -1086,7 +1086,7 @@ protected function setUpEntityStorage() { ->method('getBaseFieldDefinitions') ->will($this->returnValue($this->fieldDefinitions)); - $this->entityStorage = new ContentEntityDatabaseStorage($this->entityType, $this->connection, $this->entityManager, $this->cache); + $this->entityStorage = new SqlContentEntityStorage($this->entityType, $this->connection, $this->entityManager, $this->cache); } /** diff --git a/core/tests/Drupal/Tests/Core/Entity/Schema/ContentEntitySchemaHandlerTest.php b/core/tests/Drupal/Tests/Core/Entity/Schema/ContentEntitySchemaHandlerTest.php index 0a4afe7..ec54db6 100644 --- a/core/tests/Drupal/Tests/Core/Entity/Schema/ContentEntitySchemaHandlerTest.php +++ b/core/tests/Drupal/Tests/Core/Entity/Schema/ContentEntitySchemaHandlerTest.php @@ -35,7 +35,7 @@ class ContentEntitySchemaHandlerTest extends UnitTestCase { /** * The mocked SQL storage used in this test. * - * @var \Drupal\Core\Entity\ContentEntityDatabaseStorage|\PHPUnit_Framework_MockObject_MockObject + * @var \Drupal\Core\Entity\SqlContentEntityStorage|\PHPUnit_Framework_MockObject_MockObject */ protected $storage;