Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failure block has disappeared from the html report since Codeception 5 #6594

Closed
ccsuperstar opened this issue Oct 28, 2022 · 0 comments · Fixed by #6595
Closed

Failure block has disappeared from the html report since Codeception 5 #6594

ccsuperstar opened this issue Oct 28, 2022 · 0 comments · Fixed by #6595

Comments

@ccsuperstar
Copy link

ccsuperstar commented Oct 28, 2022

What are you trying to achieve?

Have the same html report as on Codeception 4
Before, in codeception/phpunit-wrapper/src/ResultPrinter/HTML.php, we had this method

/**
     * A failure occurred.
     *
     * @param \PHPUnit\Framework\Test                 $test
     * @param \PHPUnit\Framework\AssertionFailedError $e
     * @param float                                  $time
     */
    public function addFailure(\PHPUnit\Framework\Test $test, \PHPUnit\Framework\AssertionFailedError $e, float $time) : void
    {
        $this->failures[Descriptor::getTestSignatureUnique($test)][] = $this->cleanMessage($e);
        var_dump($this->failures);
        parent::addFailure($test, $e, $time);
    }

In new file codeception/codeception/src/Codeception/Reporter/HtmlReporter.php, it is no longer there

Maybe related to this message
Codeception 5.0.0-RC4: 5.0.0-RC4

Replaced PHPUnit\Framework\TestResult with ResultAggregator

How to find this block? Is it necessary to make an additional call?

What do you get instead?

The failure block is missing

Codeception 4
Capture d’écran 2022-10-28 à 13 46 13

Codeception 5
Capture d’écran 2022-10-28 à 13 46 20

Details

  • Codeception version: 5.0.3
  • PHP Version: 8.1
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 a pull request may close this issue.

1 participant