Test failures in PHPUnit 9.6 from #3391784

Created on 24 September 2025, 16 days ago

Problem/Motivation

In #3391784 a new set of tests were added.

In the Code Under Test there is an undefined mock which will return NULL(should return FALSE). The code under test later attempts to access a property on the NULL value.

This generates a PHP warning that in PHPUnit 9.6 causes a test failure (while in ^10.5 does not fail).

Steps to reproduce

Run TfaLoginFormHelperTest against core ^10.5, Observe failure of https://git.drupalcode.org/project/tfa/-/blob/80e2aa077eb08e84e00c540991...

Proposed resolution

Add a mock return for memory cache get of 'tfa_complete'.

Remaining tasks

Evaluate if there is any untested code execution flow.

User interface changes

API changes

Data model changes

πŸ› Bug report
Status

Active

Version

2.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States cmlara

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

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024