public function ContentEntityNormalizerAlterTest::testNormalizerAlterEvent in Replication 8
Tests the content entity normalize alter event.
File
- tests/
src/ Kernel/ Normalizer/ ContentEntityNormalizerAlterTest.php, line 60
Class
- ContentEntityNormalizerAlterTest
- Tests the content serialization format.
Namespace
Drupal\Tests\replication\Kernel\NormalizerCode
public function testNormalizerAlterEvent() {
$normalized = $this->serializer
->normalize($this->entity);
// The '_test' key should be added in
// \Drupal\replication_alter_test\Event\ContentEntityTestAlterSubscriber::onAlterContentData
$this
->assertSame([
'foo' => 'bar',
], $normalized['_test']);
}