Naktibalda · GitHub

@Naktibalda

Copy link Copy Markdown

Member

hasOutput() method was renamed to hasUnexpectedOutput() in PHPUnit 10.0.16, but we don't have to use it, because it only checks if output is not empty and expectation on output is not set.

Fixes #6654

hasOutput() method was renamed to hasUnexpectedOutput(),
but we don't have to use it, because it only checks if output is not empty and expectation on output is not set

@Naktibalda

@Naktibalda

@indy2kro

Copy link Copy Markdown

Please note that this change does not work with PHPUnit 10.3.x:

In JUnitReporter.php line 250:
  Call to private method PHPUnit\Framework\TestCase::hasExpectationOnOutput() from scope Codeception\Reporter\JUnitReporter

which from the comments seem to be meant to be an internal method anyway:

    /**
     * @internal This method is not covered by the backward compatibility promise for PHPUnit
     */
    private function hasExpectationOnOutput(): bool
    {
        return is_string($this->outputExpectedString) || is_string($this->outputExpectedRegex);
    }

Read the original on github.com ↗