Unit Test: Declaration of SetUp

Created on 4 October 2024, 3 months ago

Problem/Motivation

I believe this is a quick one: if I run a phpunit test, I get:

PHP Fatal error:  Declaration of Drupal\Tests\auto_heading_ids\HeadingIdFilterTest::setUp() must be compatible with Drupal\Tests\UnitTestCase::setUp(): void in /opt/drupal/web/modules/contrib/auto_heading_ids/tests/src/Unit/HeadingIdFilterTest.php on line 28

Steps to reproduce

Drupal 10.3.6

PHP 8.2.22

Run phpunit from the command line

Proposed resolution

I believe all it needs is to add the ": void" as part of the SetUp function definition, on line 28.

🐛 Bug report
Status

Active

Version

2.0

Component

Code

Created by

🇨🇦Canada ryanrobinson_wlu

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024