[wp-trac] [WordPress Trac] #59486: Make test suite compatible with PHPUnit 10 / 11
WordPress Trac
noreply at wordpress.org
Thu Mar 7 09:57:18 UTC 2024
#59486: Make test suite compatible with PHPUnit 10 / 11
------------------------------+-----------------------------
Reporter: dingo_d | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: Future Release
Component: Build/Test Tools | Version: 6.4
Severity: normal | Resolution:
Keywords: needs-patch | Focuses:
------------------------------+-----------------------------
Comment (by chesio):
Replying to [comment:6 jujuguru]:
> **My simple workaround**
> I've commented the call to {{{parseTestMethodAnnotations}}} out in the
file {{{abstract-testcase.php}}} and it has allowed test to complete.
Thanks for the hint, I hit the issue too while running integration tests
of one of my plugins. I use a slightly more flexible workaround:
{{{#!php
namespace My\Plugin\Tests\Integration;
<?php
/**
* Base class for all integration tests
*/
abstract class TestCase extends \WP_UnitTestCase
{
/**
* @internal Workaround to allow the tests to run on PHPUnit 10.
*
* @link https://core.trac.wordpress.org/ticket/59486
*/
public function expectDeprecated(): void
{
return;
}
}
}}}
This way WordPress test suite can be kept up to date without further
edits.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/59486#comment:8>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list