Make WordPress Core

Changeset 34608


Ignore:
Timestamp:
09/26/2015 10:03:53 PM (11 years ago)
Author:
johnbillion
Message:

Add function signature tests for the pluggable functions in wp-admin/includes/schema.php and wp-admin/includes/upgrade.php.

See #33867

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/pluggable.php

    r34607 r34608  
    7575        public function getDefinedPluggableFunctions() {
    7676
     77                require_once ABSPATH . '/wp-admin/includes/upgrade.php';
     78
     79                $test_functions = array(
     80                        'install_network',
     81                        'wp_install',
     82                        'wp_install_defaults',
     83                        'wp_new_blog_notification',
     84                        'wp_upgrade',
     85                        'install_global_terms',
     86                );
    7787                $test_files = array(
    7888                        'wp-includes/pluggable.php',
    … …  
    8090                );
    8191                $data = array();
     92
     93                foreach ( $test_functions as $function ) {
     94                        $data[] = array(
     95                                $function
     96                        );
     97                }
    8298
    8399                foreach ( $test_files as $file ) {
    … …  
    161177                        'wp_cache_reset'                     => array(),
    162178
     179                        // wp-admin/includes/schema.php:
     180                        'install_network'                    => array(),
     181
     182                        // wp-admin/includes/upgrade.php:
     183                        'wp_install'                         => array( 'blog_title', 'user_name', 'user_email', 'public', 'deprecated' => '', 'user_password' => '', 'language' => '' ),
     184                        'wp_install_defaults'                => array( 'user_id' ),
     185                        'wp_new_blog_notification'           => array( 'blog_title', 'blog_url', 'user_id', 'password' ),
     186                        'wp_upgrade'                         => array(),
     187                        'install_global_terms'               => array(),
     188
    163189                );
    164190
Note: See TracChangeset for help on using the changeset viewer.