Commit 96a7c8f7 authored by alexpott's avatar alexpott

Issue #2605904 by jmikii, swatichouhan012, kishor_kolekar, willzyx, vacho,...

Issue #2605904 by jmikii, swatichouhan012, kishor_kolekar, willzyx, vacho, Berdir, alexpott: Missing return statement in EntityManager::clearDisplayModeInfo()
parent 280bd1b8
......@@ -594,6 +594,7 @@ public function getFormModeOptionsByBundle($entity_type_id, $bundle) {
public function clearDisplayModeInfo() {
@trigger_error('EntityManagerInterface::clearDisplayModeInfo() is deprecated in Drupal 8.0.0 and will be removed before Drupal 9.0.0. Use \Drupal\Core\Entity\EntityDisplayRepositoryInterface::clearDisplayModeInfo() instead. See https://www.drupal.org/node/2549139.', E_USER_DEPRECATED);
$this->container->get('entity_display.repository')->clearDisplayModeInfo();
return $this;
}
/**
......
......@@ -453,8 +453,8 @@ public function testGetFormModeOptionsByBundle() {
* @expectedDeprecation EntityManagerInterface::clearDisplayModeInfo() is deprecated in Drupal 8.0.0 and will be removed before Drupal 9.0.0. Use \Drupal\Core\Entity\EntityDisplayRepositoryInterface::clearDisplayModeInfo() instead. See https://www.drupal.org/node/2549139.
*/
public function testClearDisplayModeInfo() {
$this->entityDisplayRepository->clearDisplayModeInfo()->shouldBeCalled()->willReturn([]);
$this->entityManager->clearDisplayModeInfo();
$this->entityDisplayRepository->clearDisplayModeInfo()->shouldBeCalled()->willReturn($this->entityDisplayRepository);
$this->assertEquals($this->entityManager, $this->entityManager->clearDisplayModeInfo());
}
/**
......
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