Skip to content

Undefined array key warning where test-case does not contain any test methods #686

@courtney-miles

Description

@courtney-miles

For PHPUnit 9, where a test-case class does not contain any test methods, the following warning is triggered:

Warning: Undefined array key 1 in /myaffiliates/test/ZBan/vendor/ergebnis/phpunit-slow-test-detector/src/Extension.php on line 374

In this situation, PHPUnit will call ::executeAfterTest with $test containing only the class name. This extension assumes there will always be a method appended after the class name, and so the warning is triggered when exploding the string on ::.

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions