X-Git-Url: http://www.aleph1.co.uk/gitweb/?a=blobdiff_plain;ds=sidebyside;f=web%2Fcore%2Fmodules%2Fblock%2Ftests%2Fsrc%2FUnit%2FBlockConfigEntityUnitTest.php;fp=web%2Fcore%2Fmodules%2Fblock%2Ftests%2Fsrc%2FUnit%2FBlockConfigEntityUnitTest.php;h=921b5d2fbbf4ec6d815cb1706beb4abcf3d7a483;hb=af6d1fb995500ae68849458ee10d66abbdcfb252;hp=8df0e93a2744340d543c15a8ee91789e01e74cde;hpb=680c79a86e3ed402f263faeac92e89fb6d9edcc0;p=yaffs-website diff --git a/web/core/modules/block/tests/src/Unit/BlockConfigEntityUnitTest.php b/web/core/modules/block/tests/src/Unit/BlockConfigEntityUnitTest.php index 8df0e93a2..921b5d2fb 100644 --- a/web/core/modules/block/tests/src/Unit/BlockConfigEntityUnitTest.php +++ b/web/core/modules/block/tests/src/Unit/BlockConfigEntityUnitTest.php @@ -3,6 +3,7 @@ namespace Drupal\Tests\block\Unit; use Drupal\Core\DependencyInjection\ContainerBuilder; +use Drupal\Core\Entity\EntityTypeManagerInterface; use Drupal\Tests\Core\Plugin\Fixtures\TestConfigurablePlugin; use Drupal\Tests\UnitTestCase; @@ -20,11 +21,11 @@ class BlockConfigEntityUnitTest extends UnitTestCase { protected $entityType; /** - * The entity manager used for testing. + * The entity type manager used for testing. * - * @var \Drupal\Core\Entity\EntityManagerInterface|\PHPUnit_Framework_MockObject_MockObject + * @var \Drupal\Core\Entity\EntityTypeManagerInterface|\PHPUnit_Framework_MockObject_MockObject */ - protected $entityManager; + protected $entityTypeManager; /** * The ID of the type of the entity under test. @@ -51,8 +52,8 @@ class BlockConfigEntityUnitTest extends UnitTestCase { ->method('getProvider') ->will($this->returnValue('block')); - $this->entityManager = $this->getMock('\Drupal\Core\Entity\EntityManagerInterface'); - $this->entityManager->expects($this->any()) + $this->entityTypeManager = $this->getMock(EntityTypeManagerInterface::class); + $this->entityTypeManager->expects($this->any()) ->method('getDefinition') ->with($this->entityTypeId) ->will($this->returnValue($this->entityType)); @@ -60,7 +61,7 @@ class BlockConfigEntityUnitTest extends UnitTestCase { $this->uuid = $this->getMock('\Drupal\Component\Uuid\UuidInterface'); $container = new ContainerBuilder(); - $container->set('entity.manager', $this->entityManager); + $container->set('entity_type.manager', $this->entityTypeManager); $container->set('uuid', $this->uuid); \Drupal::setContainer($container); }