Skip to content

Q: handling of 'void' return type on TestCase::fail and TestCase::run #9

@gggeek

Description

@gggeek

In some of my own tests, which have been executed so far on php 5.5-7.4 (via phunit 4 and 5), I have reimplemented the fail and run methods in my TestCase subclass.
I am now trying to make those same tests run as well on php 8.0, via phpunit 8 and this package.
However, when trying to run the tests, I hit the same snag as with the setUp method, namely that the return type of my methods is not compatible with the one from the grand-parent class.
Any suggestion on how to fix this?
The easiest one seems to be to implement in PHPUnitPolyfills\TestCases\TestCase methods named f.e. _run and _fail, which work the same way as _setup, but it might be considered hackish...

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions