Project

General

Profile

Actions

Task #92461

closed

Remove $mock->at() usage due to deprecation in phpunit v9

Added by Anja Leichsenring about 4 years ago. Updated almost 4 years ago.

Status:
Closed
Priority:
Should have
Category:
Tests
Target version:
-
Start date:
2020-10-01
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
11
PHP Version:
Tags:
Complexity:
Sprint Focus:

Description

Warnings like this are thrown during Unit Test runs with phpunit v9:

The at() matcher has been deprecated. It will be removed in PHPUnit 10. Please refactor your test to not rely on the order in which methods are invoked.

This seems valid advice, as ->at usage hints on whitebox tests that rely on the inner structure of a class rather on its behavior. Removing this kind of coupling resolves the warning and the code smell.


Related issues 2 (0 open2 closed)

Related to TYPO3 Core - Task #97680: Avoid method_exists() for assertFileDoesNotExist()Closed2022-05-23

Actions
Related to TYPO3 Core - Task #94706: Update to PHPunit v9ClosedWouter Wolters2021-08-04

Actions
Actions

Also available in: Atom PDF