public function ContentHubTestBase::setUp in Acquia Content Hub 8
Overrides BrowserTestBase::setUp
5 calls to ContentHubTestBase::setUp()
- EntityEmbedTest::setUp in tests/
src/ Functional/ EntityEmbedTest.php - FileImageTest::setUp in tests/
src/ Functional/ FileImageTest.php - IntegrationTest::setUp in tests/
src/ Functional/ IntegrationTest.php - MediaEntityImageTest::setUp in tests/
src/ Functional/ MediaEntityImageTest.php - ViewModesUtf8EncodedTest::setUp in tests/
src/ Functional/ ViewModesUtf8EncodedTest.php
5 methods override ContentHubTestBase::setUp()
- EntityEmbedTest::setUp in tests/
src/ Functional/ EntityEmbedTest.php - FileImageTest::setUp in tests/
src/ Functional/ FileImageTest.php - IntegrationTest::setUp in tests/
src/ Functional/ IntegrationTest.php - MediaEntityImageTest::setUp in tests/
src/ Functional/ MediaEntityImageTest.php - ViewModesUtf8EncodedTest::setUp in tests/
src/ Functional/ ViewModesUtf8EncodedTest.php
File
- tests/
src/ Functional/ ContentHubTestBase.php, line 80
Class
- ContentHubTestBase
- Provides the base class for web tests for Search API.
Namespace
Drupal\Tests\acquia_contenthub\FunctionalCode
public function setUp() : void {
parent::setUp();
// Create the users used for the tests.
$this->adminUser = $this
->drupalCreateUser($this->adminUserPermissions);
$this->unauthorizedUser = $this
->drupalCreateUser([
'access administration pages',
]);
$this->anonymousUser = $this
->drupalCreateUser();
// Get the URL generator.
$this->urlGenerator = $this->container
->get('url_generator');
// Set up Configuration Object.
$this->config = $this->container
->get('config.factory')
->getEditable('acquia_contenthub.admin_settings');
// Sets Content Hub Connection.
$this
->setContentHubConnection();
// Create a node article type.
$this
->drupalCreateContentType([
'type' => 'article',
'name' => 'Article',
]);
// Create a node page type.
$this
->drupalCreateContentType([
'type' => 'page',
'name' => 'Page',
]);
}