Make WordPress Core


Ignore:
Timestamp:
08/19/2016 03:44:37 PM (10 years ago)
Author:
boonebgorges
Message:

Tests: Move some utility classes to their own files.

Props Frank Klein.
Fixes #37523.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/includes/functions.php

    r36721 r38285  
    5959}
    6060
    61 class Basic_Object {
    62         private $foo = 'bar';
    63 
    64         public function __get( $name ) {
    65                 return $this->$name;
    66         }
    67 
    68         public function __set( $name, $value ) {
    69                 return $this->$name = $value;
    70         }
    71 
    72         public function __isset( $name ) {
    73                 return isset( $this->$name );
    74         }
    75 
    76         public function __unset( $name ) {
    77                 unset( $this->$name );
    78         }
    79 
    80         public function __call( $name, $arguments ) {
    81                 return call_user_func_array( array( $this, $name ), $arguments );
    82         }
    83 
    84         private function callMe() {
    85                 return 'maybe';
    86         }
    87 }
    88 
    89 class Basic_Subclass extends Basic_Object {}
    90 
    9161function _wp_die_handler( $message, $title = '', $args = array() ) {
    9262        if ( !$GLOBALS['_wp_die_disabled'] ) {
    … …  
    148118/**
    149119 * Helper used with the `upload_dir` filter to set https upload URL.
    150  */ 
     120 */
    151121function _upload_dir_https( $uploads ) {
    152122        $uploads['url'] = str_replace( 'http://', 'https://', $uploads['url'] );
Note: See TracChangeset for help on using the changeset viewer.