You are here

public function EntityNormalizerTest::testDenormalizeWithNoEntityType in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 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.

@covers ::denormalize

@expectedException \Symfony\Component\Serializer\Exception\UnexpectedValueException

File

core/modules/serialization/tests/src/Unit/Normalizer/EntityNormalizerTest.php, line 93
Contains \Drupal\Tests\serialization\Unit\Normalizer\EntityNormalizerTest.

Class

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

Namespace

Drupal\Tests\serialization\Unit\Normalizer

Code

public function testDenormalizeWithNoEntityType() {
  $this->entityNormalizer
    ->denormalize(array(), 'Drupal\\Core\\Entity\\ContentEntityBase');
}