Make tests not fail in D10

Created on 29 September 2023, about 1 year ago
Updated 2 October 2023, about 1 year ago

Problem/Motivation

Current 'inheritance tree' of method definitions:

  • Core BrowserTestBase::setup:
    • protected function setUp() { in D9,
    • <protected function setUp(): void { in D10.
  • select_or_other TestBase + UnitTestBase: protected/public function setUp() {
  • Real tests: protected/public function setUp(): void {

As you extend a class, you can add a return type declaration. (Proof; point 2 and 3 + the fact that tests work in D9.)

But you cannot remove it.

Steps to reproduce

Run tests in D10. See crashes.

Proposed resolution

Add return type in TestBase + UnitTestBase. Tests will work on D10, and should also still work on D9.

🐛 Bug report
Status

Fixed

Version

4.0

Component

Code

Created by

🇳🇱Netherlands roderik Amsterdam,NL / Budapest,HU

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

Comments & Activities

Production build 0.71.5 2024