You are here

public function EntityNormalizerTest::testDenormalizeWithNoEntityType in Drupal 8

Tests the denormalize() method with no entity type provided in context.

@covers ::denormalize

File

core/modules/serialization/tests/src/Unit/Normalizer/EntityNormalizerTest.php, line 113

Class

EntityNormalizerTest
@coversDefaultClass \Drupal\serialization\Normalizer\EntityNormalizer @group serialization

Namespace

Drupal\Tests\serialization\Unit\Normalizer

Code

public function testDenormalizeWithNoEntityType() {
  $this
    ->expectException(UnexpectedValueException::class);
  $this->entityNormalizer
    ->denormalize([], 'Drupal\\Core\\Entity\\ContentEntityBase');
}