$this->
installSchema('system',
['sequences'
]);
$this->
installSchema('node',
['node_access'
]);
$this->
installSchema('user',
['users_data'
]);
$this->user = User::
create([ 'name' =>
$this->
randomString(),
'status' => 1,
]);
$this->user->
save();
NodeType::
create([ 'type' => 'foo',
])->
save();
$this->
createTextField('node', 'foo', 'field_text', 'Text'
);
$this->node = Node::
create([ 'title' => 'Test Node',
'type' => 'foo',
'field_text' =>
[ 'value' => 'This is some text.',
'format' => 'text_plain',
],
'uid' =>
$this->user->
id(),
]);
$this->node->
save();
$this->container->
setAlias('sut', 'jsonapi.serializer'
);