You are here

public function UuidResolverTest::testResolveNotInInterface in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/serialization/tests/src/Unit/EntityResolver/UuidResolverTest.php \Drupal\Tests\serialization\Unit\EntityResolver\UuidResolverTest::testResolveNotInInterface()
  2. 9 core/modules/serialization/tests/src/Unit/EntityResolver/UuidResolverTest.php \Drupal\Tests\serialization\Unit\EntityResolver\UuidResolverTest::testResolveNotInInterface()

Tests resolve() with a class using the incorrect interface.

File

core/modules/serialization/tests/src/Unit/EntityResolver/UuidResolverTest.php, line 41

Class

UuidResolverTest
@coversDefaultClass \Drupal\serialization\EntityResolver\UuidResolver @group serialization

Namespace

Drupal\Tests\serialization\Unit\EntityResolver

Code

public function testResolveNotInInterface() {
  $this->entityRepository
    ->expects($this
    ->never())
    ->method('loadEntityByUuid');
  $normalizer = $this
    ->createMock('Symfony\\Component\\Serializer\\Normalizer\\NormalizerInterface');
  $this
    ->assertNull($this->resolver
    ->resolve($normalizer, [], 'test_type'));
}