From fbfba47f1aae20bfd38765a8d084950a92dd3cf0 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Sun, 7 Aug 2022 16:53:30 +0000 Subject: [PATCH] Code Modernization: Let `MockClass` extend `stdClass`. This allows for arbitrary properties to be declared on it. Alternatively, the `MockClass` could be deprecated altogether in favor of directly using `stdClass` where needed. Follow-up to [53/tests], [65/tests], [53557], [53558], [53850], [53851], [53852], [53853], [53854]. Props jrf. See #56033. git-svn-id: https://develop.svn.wordpress.org/trunk@53856 602fd350-edb4-49c9-b593-d223f7449a82 --- tests/phpunit/includes/utils.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/phpunit/includes/utils.php b/tests/phpunit/includes/utils.php index cb28fb1e91..16b331b6a6 100644 --- a/tests/phpunit/includes/utils.php +++ b/tests/phpunit/includes/utils.php @@ -461,7 +461,7 @@ function gen_tests_array( $name, $array ) { /** * Use to create objects by yourself */ -class MockClass {} +class MockClass extends stdClass {} /** * Drops all tables from the WordPress database