[wp-trac] [WordPress Trac] #50236: Extend namespaced version of PHPUnit's test case class
WordPress Trac
noreply at wordpress.org
Sun May 24 12:53:30 UTC 2020
#50236: Extend namespaced version of PHPUnit's test case class
------------------------------+--------------------
Reporter: ocean90 | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: 5.5
Component: Build/Test Tools | Version:
Severity: normal | Keywords:
Focuses: |
------------------------------+--------------------
Now that WordPress requires at least PHP 5.6 we're also able to use
namespaces.
PHPUnit uses namespaces which forced us to provide custom class aliases to
make our tests compatible with PHPUnit 6 (and PHP 5.2), see #39822.
For running the tests on PHP 5.6 we're using PHPUnit 5 which should be our
minimum supported version. Since `PHPUnit\Framework\TestCase` is already
[https://phpunit.de/manual/5.7/en/writing-tests-for-phpunit.html available
in PHPUnit 5] it should be safe to replace it. The [https://travis-
ci.com/github/WordPress/wordpress-develop/jobs/339361911 tests are still
passing].
The change would solve autocompleting issues with editors which are not
resolving the custom class aliases when you use PHPUnit 7 for example.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/50236>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list