Commit aff46e06 authored by bhanuprakashnani's avatar bhanuprakashnani Committed by joelpittet

Issue #3031519 by bhanuprakashnani, andrey.troeglazov, akshay_d, joelpittet,...

Issue #3031519 by bhanuprakashnani, andrey.troeglazov, akshay_d, joelpittet, rocket.man: Deprecated entity_get_display() and entity_get_form_display()
parent f954ed78
......@@ -62,7 +62,14 @@ class EntityMaskTest extends KernelTestBase {
->getAllViewModes();
$this->assertSame($view_modes['block_content'], $view_modes['fake_block_content']);
$display = entity_get_display('fake_block_content', 'basic', 'default');
$storage = $this->container->get('entity_type.manager')->getStorage('entity_view_display');
$display = $storage->create([
'targetEntityType' => 'fake_block_content',
'bundle' => 'basic',
'mode' => 'default',
'status' => TRUE,
]);
$this->assertTrue($display->isNew());
$components = $display->getComponents();
......@@ -86,7 +93,14 @@ class EntityMaskTest extends KernelTestBase {
->getAllFormModes();
$this->assertSame($form_modes['block_content'], $form_modes['fake_block_content']);
$display = entity_get_form_display('fake_block_content', 'basic', 'default');
$storage = $this->container->get('entity_type.manager')->getStorage('entity_form_display');
$display = $storage->create([
'targetEntityType' => 'fake_block_content',
'bundle' => 'basic',
'mode' => 'default',
'status' => TRUE,
]);
$this->assertTrue($display->isNew());
$components = $display->getComponents();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment