Make WordPress Core

Changeset 34983


Ignore:
Timestamp:
10/09/2015 04:34:29 AM (11 years ago)
Author:
DrewAPicture
Message:

Tests: Add basic DocBlocks for four helper methods in general/template.php used to assist testing the Site Icon feature.

All four helpers were introduced in the feature merge for 4.3.

See #33968.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/general/template.php

    r34688 r34983  
    107107        }
    108108
     109        /**
     110         * Builds and retrieves a custom site icon meta tag.
     111         *
     112         * @since 4.3.0
     113         *
     114         * @param $meta_tags
     115         * @return array
     116         */
    109117        function _custom_site_icon_meta_tag( $meta_tags ) {
    110118                $meta_tags[] = sprintf( '<link rel="apple-touch-icon" sizes="150x150" href="%s" />', esc_url( get_site_icon_url( 150 ) ) );
    … …  
    113121        }
    114122
     123        /**
     124         * Sets a site icon in options for testing.
     125         *
     126         * @since 4.3.0
     127         */
    115128        function _set_site_icon() {
    116129                if ( ! $this->site_icon_id ) {
    … …  
    123136        }
    124137
     138        /**
     139         * Removes the site icon from options.
     140         *
     141         * @since 4.3.0
     142         */
    125143        function _remove_site_icon() {
    126144                delete_option( 'site_icon' );
    127145        }
    128146
     147        /**
     148         * Inserts an attachment for testing site icons.
     149         *
     150         * @since 4.3.0
     151         */
    129152        function _insert_attachment() {
    130153                $filename = DIR_TESTDATA . '/images/test-image.jpg';
Note: See TracChangeset for help on using the changeset viewer.