diff --git a/tests/phpunit/includes/class-basic-object.php b/tests/phpunit/includes/class-basic-object.php new file mode 100644 index 0000000000..d4345f42a5 --- /dev/null +++ b/tests/phpunit/includes/class-basic-object.php @@ -0,0 +1,29 @@ +$name; + } + + public function __set( $name, $value ) { + return $this->$name = $value; + } + + public function __isset( $name ) { + return isset( $this->$name ); + } + + public function __unset( $name ) { + unset( $this->$name ); + } + + public function __call( $name, $arguments ) { + return call_user_func_array( array( $this, $name ), $arguments ); + } + + private function callMe() { + return 'maybe'; + } +} diff --git a/tests/phpunit/includes/class-basic-subclass.php b/tests/phpunit/includes/class-basic-subclass.php new file mode 100644 index 0000000000..842d9c8a9a --- /dev/null +++ b/tests/phpunit/includes/class-basic-subclass.php @@ -0,0 +1,3 @@ +$name; - } - - public function __set( $name, $value ) { - return $this->$name = $value; - } - - public function __isset( $name ) { - return isset( $this->$name ); - } - - public function __unset( $name ) { - unset( $this->$name ); - } - - public function __call( $name, $arguments ) { - return call_user_func_array( array( $this, $name ), $arguments ); - } - - private function callMe() { - return 'maybe'; - } -} - -class Basic_Subclass extends Basic_Object {} - function _wp_die_handler( $message, $title = '', $args = array() ) { if ( !$GLOBALS['_wp_die_disabled'] ) { _wp_die_handler_txt( $message, $title, $args); @@ -147,7 +117,7 @@ function _upload_dir_no_subdir( $uploads ) { /** * Helper used with the `upload_dir` filter to set https upload URL. - */ + */ function _upload_dir_https( $uploads ) { $uploads['url'] = str_replace( 'http://', 'https://', $uploads['url'] ); $uploads['baseurl'] = str_replace( 'http://', 'https://', $uploads['baseurl'] ); diff --git a/tests/phpunit/tests/basic.php b/tests/phpunit/tests/basic.php index f68fbeb962..1225ae3854 100644 --- a/tests/phpunit/tests/basic.php +++ b/tests/phpunit/tests/basic.php @@ -1,4 +1,8 @@