class EntityDefinitionUpdateManagerTest in Drupal 8
@coversDefaultClass \Drupal\Core\Entity\EntityDefinitionUpdateManager @group Entity @group legacy
Hierarchy
- class \Drupal\Tests\UnitTestCase extends \PHPUnit\Framework\TestCase uses PhpunitCompatibilityTrait
- class \Drupal\Tests\Core\Entity\EntityDefinitionUpdateManagerTest
Expanded class hierarchy of EntityDefinitionUpdateManagerTest
File
- core/
tests/ Drupal/ Tests/ Core/ Entity/ EntityDefinitionUpdateManagerTest.php, line 18
Namespace
Drupal\Tests\Core\EntityView 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
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
EntityDefinitionUpdateManagerTest:: |
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:: |
public | function | Returns a mock object for the specified class using the available method. | |
PhpunitCompatibilityTrait:: |
public | function | Compatibility layer for PHPUnit 6 to support PHPUnit 4 code. | |
UnitTestCase:: |
protected | property | The random generator. | |
UnitTestCase:: |
protected | property | The app root. | 1 |
UnitTestCase:: |
protected | function | Asserts if two arrays are equal by sorting them first. | |
UnitTestCase:: |
protected | function | Mocks a block with a block plugin. | 1 |
UnitTestCase:: |
protected | function | Returns a stub class resolver. | |
UnitTestCase:: |
public | function | Returns a stub config factory that behaves according to the passed array. | |
UnitTestCase:: |
public | function | Returns a stub config storage that returns the supplied configuration. | |
UnitTestCase:: |
protected | function | Sets up a container with a cache tags invalidator. | |
UnitTestCase:: |
protected | function | Gets the random generator for the utility methods. | |
UnitTestCase:: |
public | function | Returns a stub translation manager that just returns the passed string. | |
UnitTestCase:: |
public | function | Generates a unique random string containing letters and numbers. | |
UnitTestCase:: |
protected | function | 340 |