protected function StatisticsLoggingTest::setUp in Drupal 9
Same name in this branch
- 9 core/modules/statistics/tests/src/Functional/StatisticsLoggingTest.php \Drupal\Tests\statistics\Functional\StatisticsLoggingTest::setUp()
- 9 core/modules/statistics/tests/src/FunctionalJavascript/StatisticsLoggingTest.php \Drupal\Tests\statistics\FunctionalJavascript\StatisticsLoggingTest::setUp()
Same name and namespace in other branches
- 8 core/modules/statistics/tests/src/FunctionalJavascript/StatisticsLoggingTest.php \Drupal\Tests\statistics\FunctionalJavascript\StatisticsLoggingTest::setUp()
Overrides BrowserTestBase::setUp
File
- core/
modules/ statistics/ tests/ src/ FunctionalJavascript/ StatisticsLoggingTest.php, line 37
Class
- StatisticsLoggingTest
- Tests that statistics works.
Namespace
Drupal\Tests\statistics\FunctionalJavascriptCode
protected function setUp() : void {
parent::setUp();
$this
->config('statistics.settings')
->set('count_content_views', 1)
->save();
Role::load(AccountInterface::ANONYMOUS_ROLE)
->grantPermission('view post access counter')
->save();
// Add another language to enable multilingual path processor.
ConfigurableLanguage::create([
'id' => 'xx',
])
->save();
$this
->config('language.negotiation')
->set('url.prefixes.en', 'en')
->save();
$this
->drupalCreateContentType([
'type' => 'page',
'name' => 'Basic page',
]);
$this->node = $this
->drupalCreateNode();
}