Skip to content

Conversation

Naktibalda
Copy link
Member

@Naktibalda Naktibalda commented Mar 14, 2023

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 merged commit 51a4409 into 5.0 Mar 14, 2023
@Naktibalda Naktibalda deleted the phpunit-has-output-patch branch March 14, 2023 07:14
@indy2kro
Copy link

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);
    }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

problem in "--xml" key
2 participants