[wp-trac] [WordPress Trac] #50366: WordPress rest_api_init action doesn't work in PHPUnit tests
WordPress Trac
noreply at wordpress.org
Thu Jun 11 08:06:21 UTC 2020
#50366: WordPress rest_api_init action doesn't work in PHPUnit tests
-------------------------------+------------------------------
Reporter: skarabeq | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: REST API | Version: 5.4.2
Severity: normal | Resolution:
Keywords: reporter-feedback | Focuses:
-------------------------------+------------------------------
Comment (by skarabeq):
I have tried with this test - [https://github.com/bobbingwide/wordpress-
develop-tests/blob/3ced2b707e159b41b0e2f4be7153259dd5fd019d/phpunit/tests
/rest-api/rest-server.php]
I have copied the test from the above and the result is the same:
{{{
PHPUnit 5.7.27 by Sebastian Bergmann and contributors.
F
Time: 1.29 seconds, Memory: 38.50MB
There was 1 failure:
1) Tests_REST_Server::test_envelope
Unexpected incorrect usage notice for register_rest_route
Failed asserting that an array is empty.
/tmp/wordpress-tests-lib/includes/abstract-testcase.php:507
/tmp/wordpress-tests-lib/includes/abstract-testcase.php:519
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/50366#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list