Changeset 56680 for trunk/tests/phpunit/tests/admin/wpTermsListTable.php
- Timestamp:
- 09/25/2023 03:34:34 PM (19 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/admin/wpTermsListTable.php
r56631 r56680 42 42 * Call an inaccessible (private or protected) method. 43 43 * 44 * @param object|string $ objectObject instance or class string to call the method of.44 * @param object|string $instance Object instance or class string to call the method of. 45 45 * @param string $method_name Name of the method to call. 46 46 * @param array $args Optional. Array of arguments to pass to the method. … … 48 48 * @throws ReflectionException If the object could not be reflected upon. 49 49 */ 50 private function call_inaccessible_method( $ object, $method_name, $args = array() ) {51 $method = ( new ReflectionClass( $ object) )->getMethod( $method_name );50 private function call_inaccessible_method( $instance, $method_name, $args = array() ) { 51 $method = ( new ReflectionClass( $instance ) )->getMethod( $method_name ); 52 52 $method->setAccessible( true ); 53 return $method->invokeArgs( $ object, $args );53 return $method->invokeArgs( $instance, $args ); 54 54 } 55 55
Note: See TracChangeset
for help on using the changeset viewer.