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
This commit is contained in:
Sergey Biryukov 2022-08-07 16:53:30 +00:00
parent 025193bd20
commit fbfba47f1a

View File

@ -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