public function ContentHubSubscriberTestBase::setUp in Acquia Content Hub 8
Overrides BrowserTestBase::setUp
File
- acquia_contenthub_subscriber/
tests/ src/ Functional/ ContentHubSubscriberTestBase.php, line 124
Class
- ContentHubSubscriberTestBase
- Provides the base class for web tests for Content Hub Subscribers.
Namespace
Drupal\Tests\acquia_contenthub_subscriber\FunctionalCode
public function setUp() : void {
parent::setUp();
$this->defaultFormat = 'json';
$this->defaultMimeType = 'application/json';
$this->defaultAuth = [
'cookie',
];
$this->entityConfigStorage = $this->container
->get('entity_type.manager')
->getStorage('contenthub_filter');
// Create the users us ed for the tests.
$this->unauthorizedUser = $this
->createUser([
'access administration pages',
]);
$this->adminUser = $this
->createUser($this->adminUserPermissions, NULL, TRUE);
$this->anonymousUser = User::load(0);
// Get the URL generator.
$this->urlGenerator = $this->container
->get('url_generator');
}