protected function ContentEntityNormalizerTest::setUp in Replication 8.2
Overrides NormalizerTestBase::setUp
File
- tests/
src/ Unit/ Normalizer/ ContentEntityNormalizerTest.php, line 17
Class
- ContentEntityNormalizerTest
- Tests the content serialization format.
Namespace
Drupal\Tests\replication\Unit\NormalizerCode
protected function setUp() {
parent::setUp();
// @todo: {@link https://www.drupal.org/node/2600468 Attach a file field.}
// Create a test entity to serialize.
$this->values = [
'name' => $this
->randomMachineName(),
'user_id' => 1,
'field_test_text' => [
'value' => $this
->randomMachineName(),
'format' => 'full_html',
],
];
$this->entity = EntityTestMulRev::create($this->values);
$this->entity
->save();
}