function EntityNormalizerTest::testDenormalizeWithNoEntityType

Same name and namespace in other branches
  1. 10 core/modules/serialization/tests/src/Unit/Normalizer/EntityNormalizerTest.php \Drupal\Tests\serialization\Unit\Normalizer\EntityNormalizerTest::testDenormalizeWithNoEntityType()
  2. 9 core/modules/serialization/tests/src/Unit/Normalizer/EntityNormalizerTest.php \Drupal\Tests\serialization\Unit\Normalizer\EntityNormalizerTest::testDenormalizeWithNoEntityType()
  3. 8.9.x core/modules/serialization/tests/src/Unit/Normalizer/EntityNormalizerTest.php \Drupal\Tests\serialization\Unit\Normalizer\EntityNormalizerTest::testDenormalizeWithNoEntityType()
  4. main core/modules/serialization/tests/src/Unit/Normalizer/EntityNormalizerTest.php \Drupal\Tests\serialization\Unit\Normalizer\EntityNormalizerTest::testDenormalizeWithNoEntityType()

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

File

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

Class

EntityNormalizerTest
Tests Drupal\serialization\Normalizer\EntityNormalizer.

Namespace

Drupal\Tests\serialization\Unit\Normalizer

Code

public function testDenormalizeWithNoEntityType() : void {
  $this->expectException(UnexpectedValueException::class);
  $this->entityNormalizer
    ->denormalize([], ContentEntityBaseMockableClass::class);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.