protected function EntityShareClientFunctionalTestBase::createChannel in Entity Share 8.2
Same name and namespace in other branches
- 8.3 modules/entity_share_client/tests/src/Functional/EntityShareClientFunctionalTestBase.php \Drupal\Tests\entity_share_client\Functional\EntityShareClientFunctionalTestBase::createChannel()
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.
5 calls to EntityShareClientFunctionalTestBase::createChannel()
- ChangedRemovedTest::createChannel in modules/
entity_share_client/ tests/ src/ Functional/ ChangedRemovedTest.php - Helper function to create the channel used for the test.
- EntityShareClientFunctionalTestBase::setUp in modules/
entity_share_client/ tests/ src/ Functional/ EntityShareClientFunctionalTestBase.php - MissingEntityReferenceTest::createChannel in modules/
entity_share_client/ tests/ src/ Functional/ MissingEntityReferenceTest.php - Helper function to create the channel used for the test.
- MultilingualTest::createChannel in modules/
entity_share_client/ tests/ src/ Functional/ MultilingualTest.php - Helper function to create the channel used for the test.
- TaxonomyEntityReferenceTest::createChannel in modules/
entity_share_client/ tests/ src/ Functional/ TaxonomyEntityReferenceTest.php - Helper function to create the channel used for the test.
4 methods override EntityShareClientFunctionalTestBase::createChannel()
- ChangedRemovedTest::createChannel in modules/
entity_share_client/ tests/ src/ Functional/ ChangedRemovedTest.php - Helper function to create the channel used for the test.
- MissingEntityReferenceTest::createChannel in modules/
entity_share_client/ tests/ src/ Functional/ MissingEntityReferenceTest.php - Helper function to create the channel used for the test.
- MultilingualTest::createChannel in modules/
entity_share_client/ tests/ src/ Functional/ MultilingualTest.php - Helper function to create the channel used for the test.
- TaxonomyEntityReferenceTest::createChannel in modules/
entity_share_client/ tests/ src/ Functional/ TaxonomyEntityReferenceTest.php - Helper function to create the channel used for the test.
File
- modules/
entity_share_client/ tests/ src/ Functional/ EntityShareClientFunctionalTestBase.php, line 270
Class
- EntityShareClientFunctionalTestBase
- Base class for Entity share server functional tests.
Namespace
Drupal\Tests\entity_share_client\FunctionalCode
protected function createChannel(UserInterface $user) {
$channel_storage = $this->entityTypeManager
->getStorage('channel');
$channel = $channel_storage
->create([
'id' => static::$entityTypeId . '_' . static::$entityBundleId . '_' . static::$entityLangcode,
'label' => $this
->randomString(),
'channel_entity_type' => static::$entityTypeId,
'channel_bundle' => static::$entityBundleId,
'channel_langcode' => static::$entityLangcode,
'authorized_users' => [
$user
->uuid(),
],
]);
$channel
->save();
$this->channels[$channel
->id()] = $channel;
}