protected function MissingFieldsTest::createChannel in Entity Share 8.3
Helper function to create the channel used for the test.
Parameters
\Drupal\user\UserInterface $user: The user which credential will be used for the remote.
Overrides EntityShareClientFunctionalTestBase::createChannel
File
- modules/
entity_share_client/ tests/ src/ Functional/ MissingFieldsTest.php, line 134
Class
- MissingFieldsTest
- Functional test class for non-existing fields on client website.
Namespace
Drupal\Tests\entity_share_client\FunctionalCode
protected function createChannel(UserInterface $user) {
parent::createChannel($user);
// Add a channel for the node in French.
$channel_storage = $this->entityTypeManager
->getStorage('channel');
$channel = $channel_storage
->create([
'id' => 'node_es_test_fr',
'label' => $this
->randomString(),
'channel_entity_type' => 'node',
'channel_bundle' => 'es_test',
'channel_langcode' => 'fr',
'authorized_users' => [
$user
->uuid(),
],
]);
$channel
->save();
$this->channels[$channel
->id()] = $channel;
}