StatisticsLoggingTest does not truncate node_counter

Created on 1 May 2023, almost 2 years ago
Updated 3 May 2023, almost 2 years ago

Problem/Motivation

There is an old code in StatisticsLoggingTest::setUp() function, which is supposed to truncate data in node_counter table. But the statement is missing the execute() call, so this trucate is not working currently.

    // Clear the logs.
    Database::getConnection()->truncate('node_counter');

https://git.drupalcode.org/project/drupal/-/blob/10.1.x/core/modules/statistics/tests/src/Functional/StatisticsLoggingTest.php#L103

There are two options - fix the truncate, or remove it entirely. It seems like it is not needed, as it is not causing any test failures. Therefore I think it will be feasible to remove it entirely.

Steps to reproduce

Proposed resolution

Fix the truncate call, or remove it entirely.

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

🐛 Bug report
Status

Fixed

Version

10.1

Component
PHPUnit 

Last updated about 1 hour ago

Created by

🇸🇰Slovakia poker10

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024