public function DenormalizeTest::testTypeHandlingWithNoTypes in Drupal 9
Same name and namespace in other branches
- 8 core/modules/hal/tests/src/Kernel/DenormalizeTest.php \Drupal\Tests\hal\Kernel\DenormalizeTest::testTypeHandlingWithNoTypes()
Tests link relation handling with no types.
File
- core/
modules/ hal/ tests/ src/ Kernel/ DenormalizeTest.php, line 96
Class
- DenormalizeTest
- Tests HAL denormalization edge cases for EntityResource.
Namespace
Drupal\Tests\hal\KernelCode
public function testTypeHandlingWithNoTypes() {
$data_with_no_types = [
'_links' => [
'type' => [],
],
];
$this
->expectException(UnexpectedValueException::class);
$this->serializer
->denormalize($data_with_no_types, $this->entityClass, $this->format);
}