You are here

public function UuidResolverTest::testResolveNotInInterface in Drupal 8

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

Test 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'));
}