mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2025-10-16 12:05:38 +00:00
Tests: Require the WP_REST_Test_Controller class in WP_REST_Controller tests.
This avoids a "Class not found" PHP fatal error when running these tests separately. Follow-up to [38832]. See #53363. git-svn-id: https://develop.svn.wordpress.org/trunk@51452 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
54c54f9a1e
commit
f28e3d0b88
@ -11,6 +11,11 @@
|
||||
*/
|
||||
class WP_Test_REST_Controller extends WP_Test_REST_TestCase {
|
||||
|
||||
public static function wpSetUpBeforeClass( WP_UnitTest_Factory $factory ) {
|
||||
// Load the WP_REST_Test_Controller class if not already loaded.
|
||||
require_once __DIR__ . '/rest-test-controller.php';
|
||||
}
|
||||
|
||||
public function setUp() {
|
||||
parent::setUp();
|
||||
$this->request = new WP_REST_Request(
|
||||
|
||||
Loading…
Reference in New Issue
Block a user