You are here

class EntityDefinitionUpdateManagerTest in Drupal 8

@coversDefaultClass \Drupal\Core\Entity\EntityDefinitionUpdateManager @group Entity @group legacy

Hierarchy

Expanded class hierarchy of EntityDefinitionUpdateManagerTest

File

core/tests/Drupal/Tests/Core/Entity/EntityDefinitionUpdateManagerTest.php, line 18

Namespace

Drupal\Tests\Core\Entity
View source
class EntityDefinitionUpdateManagerTest extends UnitTestCase {

  /**
   * @expectedDeprecation Unsilenced deprecation: EntityDefinitionUpdateManagerInterface::applyUpdates() is deprecated in 8.7.0 and will be removed before Drupal 9.0.0. Use \Drupal\Core\Entity\EntityDefinitionUpdateManagerInterface::getChangeList() and execute each entity type and field storage update manually instead. See https://www.drupal.org/node/3034742.
   */
  public function testDeprecatedApplyUpdates() {
    $entity_type_manager = $this
      ->prophesize(EntityTypeManagerInterface::class)
      ->reveal();
    $entity_last_installed_schema_repository = $this
      ->prophesize(EntityLastInstalledSchemaRepositoryInterface::class)
      ->reveal();
    $entity_field_manager = $this
      ->prophesize(EntityFieldManagerInterface::class)
      ->reveal();
    $entity_type_listener = $this
      ->prophesize(EntityTypeListenerInterface::class)
      ->reveal();
    $field_storage_definition_listener = $this
      ->prophesize(FieldStorageDefinitionListenerInterface::class)
      ->reveal();
    $entity_definition_update_manager = new EntityDefinitionUpdateManager($entity_type_manager, $entity_last_installed_schema_repository, $entity_field_manager, $entity_type_listener, $field_storage_definition_listener);
    $this
      ->assertNull($entity_definition_update_manager
      ->applyUpdates());
  }

}

Members

Namesort descending Modifiers Type Description Overrides
EntityDefinitionUpdateManagerTest::testDeprecatedApplyUpdates public function @expectedDeprecation Unsilenced deprecation: EntityDefinitionUpdateManagerInterface::applyUpdates() is deprecated in 8.7.0 and will be removed before Drupal 9.0.0. Use \Drupal\Core\Entity\EntityDefinitionUpdateManagerInterface::getChangeList() and…
PhpunitCompatibilityTrait::getMock Deprecated public function Returns a mock object for the specified class using the available method.
PhpunitCompatibilityTrait::setExpectedException Deprecated public function Compatibility layer for PHPUnit 6 to support PHPUnit 4 code.
UnitTestCase::$randomGenerator protected property The random generator.
UnitTestCase::$root protected property The app root. 1
UnitTestCase::assertArrayEquals protected function Asserts if two arrays are equal by sorting them first.
UnitTestCase::getBlockMockWithMachineName Deprecated protected function Mocks a block with a block plugin. 1
UnitTestCase::getClassResolverStub protected function Returns a stub class resolver.
UnitTestCase::getConfigFactoryStub public function Returns a stub config factory that behaves according to the passed array.
UnitTestCase::getConfigStorageStub public function Returns a stub config storage that returns the supplied configuration.
UnitTestCase::getContainerWithCacheTagsInvalidator protected function Sets up a container with a cache tags invalidator.
UnitTestCase::getRandomGenerator protected function Gets the random generator for the utility methods.
UnitTestCase::getStringTranslationStub public function Returns a stub translation manager that just returns the passed string.
UnitTestCase::randomMachineName public function Generates a unique random string containing letters and numbers.
UnitTestCase::setUp protected function 340