Loading core/tests/Drupal/Tests/Core/Entity/EntityFieldManagerTest.php +0 −5 Original line number Diff line number Diff line Loading @@ -15,7 +15,6 @@ use Drupal\Core\Entity\ContentEntityTypeInterface; use Drupal\Core\Entity\EntityDisplayRepositoryInterface; use Drupal\Core\Entity\EntityFieldManager; use Drupal\Core\Entity\EntityInterface; use Drupal\Core\Entity\EntityLastInstalledSchemaRepositoryInterface; use Drupal\Core\Entity\EntityStorageInterface; use Drupal\Core\Entity\EntityTypeBundleInfoInterface; Loading Loading @@ -195,16 +194,12 @@ protected function setUp(): void { * (optional) An array of entity type definitions. */ protected function setUpEntityTypeDefinitions($definitions = []) { $class = $this->getMockClass(EntityInterface::class); foreach ($definitions as $key => $entity_type) { // \Drupal\Core\Entity\EntityTypeInterface::getLinkTemplates() is called // by \Drupal\Core\Entity\EntityTypeManager::processDefinition() so it must // always be mocked. $entity_type->getLinkTemplates()->willReturn([]); // Give the entity type a legitimate class to return. $entity_type->getClass()->willReturn($class); $definitions[$key] = $entity_type->reveal(); } Loading core/tests/Drupal/Tests/Core/Entity/EntityTypeBundleInfoTest.php +0 −5 Original line number Diff line number Diff line Loading @@ -6,7 +6,6 @@ use Drupal\Core\Cache\Cache; use Drupal\Core\Cache\CacheBackendInterface; use Drupal\Core\Cache\CacheTagsInvalidatorInterface; use Drupal\Core\Entity\EntityInterface; use Drupal\Core\Entity\EntityTypeBundleInfo; use Drupal\Core\Entity\EntityTypeInterface; use Drupal\Core\Entity\EntityTypeManagerInterface; Loading Loading @@ -112,16 +111,12 @@ protected function setUp(): void { * (optional) An array of entity type definitions. */ protected function setUpEntityTypeDefinitions($definitions = []) { $class = $this->getMockClass(EntityInterface::class); foreach ($definitions as $key => $entity_type) { // \Drupal\Core\Entity\EntityTypeInterface::getLinkTemplates() is called // by \Drupal\Core\Entity\EntitTypeManager::processDefinition() so it must // always be mocked. $entity_type->getLinkTemplates()->willReturn([]); // Give the entity type a legitimate class to return. $entity_type->getClass()->willReturn($class); $definitions[$key] = $entity_type->reveal(); } Loading core/tests/Drupal/Tests/Core/Entity/EntityTypeManagerTest.php +1 −1 Original line number Diff line number Diff line Loading @@ -97,7 +97,7 @@ protected function setUp(): void { * (optional) An array of entity type definitions. */ protected function setUpEntityTypeDefinitions($definitions = []) { $class = $this->getMockClass(EntityInterface::class); $class = get_class($this->createMock(EntityInterface::class)); foreach ($definitions as $key => $entity_type) { // \Drupal\Core\Entity\EntityTypeInterface::getLinkTemplates() is called // by \Drupal\Core\Entity\EntityTypeManager::processDefinition() so it must Loading core/tests/Drupal/Tests/Core/Entity/EntityTypeRepositoryTest.php +1 −2 Original line number Diff line number Diff line Loading @@ -50,7 +50,6 @@ protected function setUp(): void { * (optional) An array of entity type definitions. */ protected function setUpEntityTypeDefinitions($definitions = []) { $class = $this->getMockClass(EntityInterface::class); foreach ($definitions as $key => $entity_type) { // \Drupal\Core\Entity\EntityTypeInterface::getLinkTemplates() is called // by \Drupal\Core\Entity\EntityTypeManager::processDefinition() so it must Loading @@ -58,7 +57,7 @@ protected function setUpEntityTypeDefinitions($definitions = []) { $entity_type->getLinkTemplates()->willReturn([]); // Give the entity type a legitimate class to return. $entity_type->getClass()->willReturn($class); $entity_type->getClass()->willReturn(EntityInterface::class); $definitions[$key] = $entity_type->reveal(); } Loading core/tests/Drupal/Tests/Core/Field/FieldDefinitionListenerTest.php +0 −5 Original line number Diff line number Diff line Loading @@ -6,7 +6,6 @@ use Drupal\Core\Cache\CacheBackendInterface; use Drupal\Core\Entity\DynamicallyFieldableEntityStorageInterface; use Drupal\Core\Entity\EntityFieldManagerInterface; use Drupal\Core\Entity\EntityInterface; use Drupal\Core\Entity\EntityTypeInterface; use Drupal\Core\Entity\EntityTypeManagerInterface; use Drupal\Core\Field\FieldDefinitionInterface; Loading Loading @@ -78,16 +77,12 @@ protected function setUp(): void { * (optional) An array of entity type definitions. */ protected function setUpEntityTypeManager($definitions = []) { $class = $this->getMockClass(EntityInterface::class); foreach ($definitions as $key => $entity_type) { // \Drupal\Core\Entity\EntityTypeInterface::getLinkTemplates() is called // by \Drupal\Core\Entity\EntityTypeManager::processDefinition() so it must // always be mocked. $entity_type->getLinkTemplates()->willReturn([]); // Give the entity type a legitimate class to return. $entity_type->getClass()->willReturn($class); $definitions[$key] = $entity_type->reveal(); } Loading Loading
core/tests/Drupal/Tests/Core/Entity/EntityFieldManagerTest.php +0 −5 Original line number Diff line number Diff line Loading @@ -15,7 +15,6 @@ use Drupal\Core\Entity\ContentEntityTypeInterface; use Drupal\Core\Entity\EntityDisplayRepositoryInterface; use Drupal\Core\Entity\EntityFieldManager; use Drupal\Core\Entity\EntityInterface; use Drupal\Core\Entity\EntityLastInstalledSchemaRepositoryInterface; use Drupal\Core\Entity\EntityStorageInterface; use Drupal\Core\Entity\EntityTypeBundleInfoInterface; Loading Loading @@ -195,16 +194,12 @@ protected function setUp(): void { * (optional) An array of entity type definitions. */ protected function setUpEntityTypeDefinitions($definitions = []) { $class = $this->getMockClass(EntityInterface::class); foreach ($definitions as $key => $entity_type) { // \Drupal\Core\Entity\EntityTypeInterface::getLinkTemplates() is called // by \Drupal\Core\Entity\EntityTypeManager::processDefinition() so it must // always be mocked. $entity_type->getLinkTemplates()->willReturn([]); // Give the entity type a legitimate class to return. $entity_type->getClass()->willReturn($class); $definitions[$key] = $entity_type->reveal(); } Loading
core/tests/Drupal/Tests/Core/Entity/EntityTypeBundleInfoTest.php +0 −5 Original line number Diff line number Diff line Loading @@ -6,7 +6,6 @@ use Drupal\Core\Cache\Cache; use Drupal\Core\Cache\CacheBackendInterface; use Drupal\Core\Cache\CacheTagsInvalidatorInterface; use Drupal\Core\Entity\EntityInterface; use Drupal\Core\Entity\EntityTypeBundleInfo; use Drupal\Core\Entity\EntityTypeInterface; use Drupal\Core\Entity\EntityTypeManagerInterface; Loading Loading @@ -112,16 +111,12 @@ protected function setUp(): void { * (optional) An array of entity type definitions. */ protected function setUpEntityTypeDefinitions($definitions = []) { $class = $this->getMockClass(EntityInterface::class); foreach ($definitions as $key => $entity_type) { // \Drupal\Core\Entity\EntityTypeInterface::getLinkTemplates() is called // by \Drupal\Core\Entity\EntitTypeManager::processDefinition() so it must // always be mocked. $entity_type->getLinkTemplates()->willReturn([]); // Give the entity type a legitimate class to return. $entity_type->getClass()->willReturn($class); $definitions[$key] = $entity_type->reveal(); } Loading
core/tests/Drupal/Tests/Core/Entity/EntityTypeManagerTest.php +1 −1 Original line number Diff line number Diff line Loading @@ -97,7 +97,7 @@ protected function setUp(): void { * (optional) An array of entity type definitions. */ protected function setUpEntityTypeDefinitions($definitions = []) { $class = $this->getMockClass(EntityInterface::class); $class = get_class($this->createMock(EntityInterface::class)); foreach ($definitions as $key => $entity_type) { // \Drupal\Core\Entity\EntityTypeInterface::getLinkTemplates() is called // by \Drupal\Core\Entity\EntityTypeManager::processDefinition() so it must Loading
core/tests/Drupal/Tests/Core/Entity/EntityTypeRepositoryTest.php +1 −2 Original line number Diff line number Diff line Loading @@ -50,7 +50,6 @@ protected function setUp(): void { * (optional) An array of entity type definitions. */ protected function setUpEntityTypeDefinitions($definitions = []) { $class = $this->getMockClass(EntityInterface::class); foreach ($definitions as $key => $entity_type) { // \Drupal\Core\Entity\EntityTypeInterface::getLinkTemplates() is called // by \Drupal\Core\Entity\EntityTypeManager::processDefinition() so it must Loading @@ -58,7 +57,7 @@ protected function setUpEntityTypeDefinitions($definitions = []) { $entity_type->getLinkTemplates()->willReturn([]); // Give the entity type a legitimate class to return. $entity_type->getClass()->willReturn($class); $entity_type->getClass()->willReturn(EntityInterface::class); $definitions[$key] = $entity_type->reveal(); } Loading
core/tests/Drupal/Tests/Core/Field/FieldDefinitionListenerTest.php +0 −5 Original line number Diff line number Diff line Loading @@ -6,7 +6,6 @@ use Drupal\Core\Cache\CacheBackendInterface; use Drupal\Core\Entity\DynamicallyFieldableEntityStorageInterface; use Drupal\Core\Entity\EntityFieldManagerInterface; use Drupal\Core\Entity\EntityInterface; use Drupal\Core\Entity\EntityTypeInterface; use Drupal\Core\Entity\EntityTypeManagerInterface; use Drupal\Core\Field\FieldDefinitionInterface; Loading Loading @@ -78,16 +77,12 @@ protected function setUp(): void { * (optional) An array of entity type definitions. */ protected function setUpEntityTypeManager($definitions = []) { $class = $this->getMockClass(EntityInterface::class); foreach ($definitions as $key => $entity_type) { // \Drupal\Core\Entity\EntityTypeInterface::getLinkTemplates() is called // by \Drupal\Core\Entity\EntityTypeManager::processDefinition() so it must // always be mocked. $entity_type->getLinkTemplates()->willReturn([]); // Give the entity type a legitimate class to return. $entity_type->getClass()->willReturn($class); $definitions[$key] = $entity_type->reveal(); } Loading