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

fix(phpunit): tests are not successful anymore due to a missing method #2403

Closed
nxtpge opened this issue May 28, 2023 · 1 comment
Closed

Comments

@nxtpge
Copy link
Contributor

nxtpge commented May 28, 2023

Describe the Bug

PHPUnit tests with PHP above or equal to version 8.1 are not successful anymore preventing contributions (pull requests) to be validated.

It is caused by the fact that PHPUnit misses the PHPUnit\Framework\TestCase::setOutputCallback() method which was available in version 9.6 but removed in 10.1.

Steps to Reproduce

composer test-no-coverage

Expected Behavior

Tests are successful.

Current Behavior

Command's output:

There were 4 errors:

1) PhpOffice\PhpWordTests\PhpWordTest::testSave
Error: Call to undefined method PhpOffice\PhpWordTests\PhpWordTest::setOutputCallback()

/path/to/repository/PHPWord/tests/PhpWordTests/PhpWordTest.php:125

2) PhpOffice\PhpWordTests\Writer\ODTextTest::testSavePhpOutput
Error: Call to undefined method PhpOffice\PhpWordTests\Writer\ODTextTest::setOutputCallback()

/path/to/repository/PHPWord/tests/PhpWordTests/Writer/ODTextTest.php:106

3) PhpOffice\PhpWordTests\Writer\RTFTest::testSavePhpOutput
Error: Call to undefined method PhpOffice\PhpWordTests\Writer\RTFTest::setOutputCallback()

/path/to/repository/PHPWord/tests/PhpWordTests/Writer/RTFTest.php:107

4) PhpOffice\PhpWordTests\Writer\Word2007Test::testSetGetUseDiskCaching
Error: Call to undefined method PhpOffice\PhpWordTests\Writer\Word2007Test::setOutputCallback()

/path/to/repository/PHPWord/tests/PhpWordTests/Writer/Word2007Test.php:172

Context

  • PHP Version: 8.1.18
  • PHPWord Version: 1.0.0
  • PHPUnit Version: 10.1.3
@PowerKiKi
Copy link
Member

Fixed by #2404

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

No branches or pull requests

2 participants