protected function GoogleAnalyticsCustomDimensionsAndMetricsTest::setUp in Google Analytics 8.2
Same name and namespace in other branches
- 8.3 tests/src/Functional/GoogleAnalyticsCustomDimensionsAndMetricsTest.php \Drupal\Tests\google_analytics\Functional\GoogleAnalyticsCustomDimensionsAndMetricsTest::setUp()
- 4.x tests/src/Functional/GoogleAnalyticsCustomDimensionsAndMetricsTest.php \Drupal\Tests\google_analytics\Functional\GoogleAnalyticsCustomDimensionsAndMetricsTest::setUp()
Overrides BrowserTestBase::setUp
File
- tests/
src/ Functional/ GoogleAnalyticsCustomDimensionsAndMetricsTest.php, line 32
Class
- GoogleAnalyticsCustomDimensionsAndMetricsTest
- Test custom dimensions and metrics functionality of Google Analytics module.
Namespace
Drupal\Tests\google_analytics\FunctionalCode
protected function setUp() {
parent::setUp();
$permissions = [
'access administration pages',
'administer google analytics',
'administer nodes',
'create article content',
];
// Create node type.
$this
->drupalCreateContentType([
'type' => 'article',
'name' => 'Article',
]);
// User to set up google_analytics.
$this->admin_user = $this
->drupalCreateUser($permissions);
$this
->drupalLogin($this->admin_user);
}