Commit b245d594 authored by catch's avatar catch

Issue #2639686 by heykarthikwithu: Replace get('entity.manager') with...

Issue #2639686 by heykarthikwithu: Replace get('entity.manager') with get('entity_type.manager') in block module
parent 95ce9eb8
......@@ -70,7 +70,7 @@ function testBlockRenderOrder() {
$this->drupalGet('');
$test_content = $this->getRawContent('');
$controller = $this->container->get('entity.manager')->getStorage('block');
$controller = $this->container->get('entity_type.manager')->getStorage('block');
foreach ($controller->loadMultiple() as $return_block) {
$id = $return_block->id();
if ($return_block_weight = $return_block->getWeight()) {
......
......@@ -38,7 +38,7 @@ class BlockStorageUnitTest extends KernelTestBase {
protected function setUp() {
parent::setUp();
$this->controller = $this->container->get('entity.manager')->getStorage('block');
$this->controller = $this->container->get('entity_type.manager')->getStorage('block');
}
/**
......
......@@ -65,7 +65,7 @@ protected function setUp() {
'sidebar_second',
'footer',
);
$block_storage = $this->container->get('entity.manager')->getStorage('block');
$block_storage = $this->container->get('entity_type.manager')->getStorage('block');
$blocks = $block_storage->loadByProperties(array('theme' => $this->config('system.theme')->get('default')));
foreach ($blocks as $block) {
$block->delete();
......
......@@ -145,7 +145,7 @@ public function testDeleteBlockDisplay() {
$this->assertBlockAppears($block_3);
$this->assertBlockAppears($block_4);
$block_storage = $this->container->get('entity.manager')->getStorage('block');
$block_storage = $this->container->get('entity_type.manager')->getStorage('block');
// Remove the block display, so both block entities from the first view
// should both disappear.
......@@ -192,7 +192,7 @@ public function testViewsBlockForm() {
$this->assertNoFieldById('edit-machine-name', 'views_block__test_view_block_1', 'The machine name is hidden on the views block form.');
// Save the block.
$this->drupalPostForm(NULL, array(), t('Save block'));
$storage = $this->container->get('entity.manager')->getStorage('block');
$storage = $this->container->get('entity_type.manager')->getStorage('block');
$block = $storage->load('views_block__test_view_block_block_1');
// This will only return a result if our new block has been created with the
// expected machine name.
......
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