protected function EntityShareClientFunctionalTestBase::setUp in Entity Share 8.3
Same name and namespace in other branches
- 8.2 modules/entity_share_client/tests/src/Functional/EntityShareClientFunctionalTestBase.php \Drupal\Tests\entity_share_client\Functional\EntityShareClientFunctionalTestBase::setUp()
Overrides BrowserTestBase::setUp
22 calls to EntityShareClientFunctionalTestBase::setUp()
- AuthenticationAnonymousTest::setUp in modules/
entity_share_client/ tests/ src/ Functional/ AuthenticationAnonymousTest.php - AuthenticationBasicAuthTest::setUp in modules/
entity_share_client/ tests/ src/ Functional/ AuthenticationBasicAuthTest.php - AuthenticationOAuthTest::setUp in modules/
entity_share_client/ tests/ src/ Functional/ AuthenticationOAuthTest.php - BasicFieldsTest::setUp in modules/
entity_share_client/ tests/ src/ Functional/ BasicFieldsTest.php - BlockFieldTest::setUp in modules/
entity_share_client/ tests/ src/ Functional/ BlockFieldTest.php
22 methods override EntityShareClientFunctionalTestBase::setUp()
- AuthenticationAnonymousTest::setUp in modules/
entity_share_client/ tests/ src/ Functional/ AuthenticationAnonymousTest.php - AuthenticationBasicAuthTest::setUp in modules/
entity_share_client/ tests/ src/ Functional/ AuthenticationBasicAuthTest.php - AuthenticationOAuthTest::setUp in modules/
entity_share_client/ tests/ src/ Functional/ AuthenticationOAuthTest.php - BasicFieldsTest::setUp in modules/
entity_share_client/ tests/ src/ Functional/ BasicFieldsTest.php - BlockFieldTest::setUp in modules/
entity_share_client/ tests/ src/ Functional/ BlockFieldTest.php
File
- modules/
entity_share_client/ tests/ src/ Functional/ EntityShareClientFunctionalTestBase.php, line 215
Class
- EntityShareClientFunctionalTestBase
- Base class for Entity Share Client functional tests.
Namespace
Drupal\Tests\entity_share_client\FunctionalCode
protected function setUp() : void {
parent::setUp();
// Prepare users.
$this->adminUser = $this
->drupalCreateUser($this
->getAdministratorPermissions());
$this->channelUser = $this
->drupalCreateUser($this
->getChannelUserPermissions());
// Enable count meta to be able to use the importChannel method on the
// import service.
$config = $this->container
->get('config.factory')
->getEditable('jsonapi_extras.settings');
$config
->set('include_count', TRUE);
$config
->save(TRUE);
// Retrieve required services.
$this->fileSystem = $this->container
->get('file_system');
$this->streamWrapperManager = $this->container
->get('stream_wrapper_manager');
$this->entityTypeManager = $this->container
->get('entity_type.manager');
$this->entityDefinitions = $this->entityTypeManager
->getDefinitions();
$this->importService = $this->container
->get('entity_share_client.import_service');
$this->remoteManager = $this->container
->get('entity_share_client.remote_manager');
$this->authPluginManager = $this->container
->get('plugin.manager.entity_share_client_authorization');
$this->keyValueStore = $this->container
->get('keyvalue')
->get(ClientAuthorizationInterface::LOCAL_STORAGE_KEY_VALUE_COLLECTION);
$this->faker = Factory::create();
// Add French phone number.
$this->faker
->addProvider(new PhoneNumber($this->faker));
$this
->createRemote($this->channelUser);
$this
->createChannel($this->channelUser);
$this
->createImportConfig();
}