Make WordPress Core

Ticket #38489: fix-spelling-phpunit.patch

File fix-spelling-phpunit.patch, 13.6 KB (added by ottok, 8 years ago)
  • tests/phpunit/data/formatting/sizzle.js

     
    1717        rNonWord = /\W/;
    1818
    1919// Here we check if the JavaScript engine is using some sort of
    20 // optimization where it does not always call our comparision
     20// optimization where it does not always call our comparison
    2121// function. If that is the case, discard the hasDuplicate value.
    2222//   Thus far that includes Google Chrome.
    2323[0, 0].sort(function() {
  • tests/phpunit/data/formatting/whole-posts.php

     
    719719<img class="alignright" src="http://www.example.com/postimages/2013/philipmetroid.jpg" alt="" width="50" height="50" />
    720720<p class="triangle-right right">PLOT TWIST</p>
    721721<img class="alignleft" src="http://www.example.com/postimages/2013/aarone.jpeg" alt="" width="50" height="50" />
    722 <p class="triangle-right lefttwo">Video of famous director eating grilled Sandwich while swiping with greasy fingers.</p>
     722<p class="triangle-right lefttwo">Video of famous director eating grilled Sandwhich while swiping with greasy fingers.</p>
    723723<img class="alignright" src="http://www.example.com/postimages/2013/philipmetroid.jpg" alt="" width="50" height="50" />
    724724<p class="triangle-right right">WHOA</p>
    725725<img class="alignleft" src="http://www.example.com/postimages/2013/bobm.jpeg" alt="" width="50" height="50" />
  • tests/phpunit/data/formatting/xssAttacks.xml

     
    689689        <attack>
    690690                <name>Extraneous Open Brackets</name>
    691691                <code>&lt;&lt;SCRIPT&gt;alert(&quot;XSS&quot;);//&lt;&lt;/SCRIPT&gt;</code>
    692                 <desc>(Submitted by Franz Sedlmaier http://www.pilorz.net/).  This XSS vector could defeat certain detection engines that work by first using matching pairs of open and close angle brackets and then by doing a comparison of the tag inside, instead of a more efficient algorythm like Boyer-Moore (http://www.cs.utexas.edu/users/moore/best-ideas/string-searching/) that looks for entire string matches of the open angle bracket and associated tag (post de-obfuscation, of course).  The double slash comments out the ending extraneous bracket to supress a JavaScript error.</desc>
     692                <desc>(Submitted by Franz Sedlmaier http://www.pilorz.net/).  This XSS vector could defeat certain detection engines that work by first using matchingg pairs of open and close angle brackets and then by doing a comparison of the tag inside, instead of a more efficient algorythm like Boyer-Moore (http://www.cs.utexas.edu/users/moore/best-ideas/string-searching/) that looks for entire string matches of the open angle bracket and associated tag (post de-obfuscation, of course).  The double slash comments out the ending extraneous bracket to suppress a JavaScript error.</desc>
    693693                <label>Embedded Character Attacks</label>
    694694                <browser>Browser support: [&lt;span class=&quot;s&quot;&gt;IE6.0&lt;/span&gt;|&lt;span class=&quot;s&quot;&gt;NS8.1-IE&lt;/span&gt;] [&lt;span class=&quot;s&quot;&gt;NS8.1-G&lt;/span&gt;|&lt;span class=&quot;s&quot;&gt;FF1.5&lt;/span&gt;] [&lt;span class=&quot;s&quot;&gt;O8.54&lt;/span&gt;]</browser>
    695695        </attack>
     
    969969        <attack>
    970970                <name>Filter Evasion 2</name>
    971971                <code>&lt;SCRIPT a=&quot;>&apos;>&quot; SRC=&quot;http://ha.ckers.org/xss.js&quot;&gt;&lt;/SCRIPT&gt;</code>
    972                 <desc>Here&apos;s an XSS example that bets on the fact that the regex won&apos;t catch a matching pair of quotes but will rather find any quotes to terminate a parameter string improperly.</desc>
     972                <desc>Here&apos;s an XSS example that bets on the fact that the regex won&apos;t catch a matchingg pair of quotes but will rather find any quotes to terminate a parameter string improperly.</desc>
    973973                <label>XSS w/HTML Quote Encapsulation</label>
    974974                <browser>Browser support: [&lt;span class=&quot;s&quot;&gt;IE6.0&lt;/span&gt;|&lt;span class=&quot;s&quot;&gt;NS8.1-IE&lt;/span&gt;] [&lt;span class=&quot;s&quot;&gt;NS8.1-G&lt;/span&gt;|&lt;span class=&quot;s&quot;&gt;FF1.5&lt;/span&gt;] [&lt;span class=&quot;s&quot;&gt;O8.54&lt;/span&gt;]</browser>
    975975        </attack>
  • tests/phpunit/includes/utils.php

    Cannot display: file marked as a binary type.
    svn:mime-type = application/octet-stream
    Cannot display: file marked as a binary type.
    svn:mime-type = application/octet-stream
     
    315315        echo "\n";
    316316}
    317317
    318 // mask out any input fields matching the given name
     318// mask out any input fields matchingg the given name
    319319function mask_input_value($in, $name='_wpnonce') {
    320320        return preg_replace('@<input([^>]*) name="'.preg_quote($name).'"([^>]*) value="[^>]*" />@', '<input$1 name="'.preg_quote($name).'"$2 value="***" />', $in);
    321321}
  • tests/phpunit/tests/cache.php

     
    285285                global $wp_object_cache;
    286286
    287287                if ( wp_using_ext_object_cache() ) {
    288                         // External caches will contain property values that contain non-matching resource IDs
     288                        // External caches will contain property values that contain non-matchingg resource IDs
    289289                        $this->assertInstanceOf( 'WP_Object_Cache', $wp_object_cache  );
    290290                } else {
    291291                        $this->assertEquals( $wp_object_cache, $new_blank_cache_object );
  • tests/phpunit/tests/cron.php

     
    4444                $args = array('foo');
    4545
    4646                wp_schedule_single_event( $timestamp, $hook, $args );
    47                 // this returns the timestamp only if we provide matching args
     47                // this returns the timestamp only if we provide matchingg args
    4848                $this->assertEquals( $timestamp, wp_next_scheduled($hook, $args) );
    4949                // these don't match so return nothing
    5050                $this->assertEquals( false, wp_next_scheduled($hook) );
     
    7575                $args = array('foo');
    7676
    7777                wp_schedule_event( $timestamp, 'hourly', $hook, $args );
    78                 // this returns the timestamp only if we provide matching args
     78                // this returns the timestamp only if we provide matchingg args
    7979                $this->assertEquals( $timestamp, wp_next_scheduled($hook, $args) );
    8080                // these don't match so return nothing
    8181                $this->assertEquals( false, wp_next_scheduled($hook) );
  • tests/phpunit/tests/dependencies/styles.php

     
    112112        }
    113113
    114114        /**
    115          * Test if inline styles work with concatination
     115         * Test if inline styles work with concatenation
    116116         * @global WP_Styles $wp_styles
    117117         * @ticket 24813
    118118         */
  • tests/phpunit/tests/formatting/Smilies.php

     
    254254                        smilies_init();
    255255                }
    256256
    257                 $orig_trans = $wpsmiliestrans; // save original tranlations array
     257                $orig_trans = $wpsmiliestrans; // save original translations array
    258258
    259259                $wpsmiliestrans = array (
    260260                  ':)' => 'simple-smile.png'
  • tests/phpunit/tests/http/base.php

     
    186186         * @ticket 11888
    187187         */
    188188        function test_send_headers() {
    189                 // Test that the headers sent are recieved by the server
     189                // Test that the headers sent are received by the server
    190190                $headers = array('test1' => 'test', 'test2' => 0, 'test3' => '');
    191191                $res = wp_remote_request( $this->redirection_script . '?header-check', array('headers' => $headers) );
    192192
  • tests/phpunit/tests/image/meta.php

     
    8888        function test_exif_error() {
    8989
    9090                // https://core.trac.wordpress.org/ticket/6571
    91                 // this triggers a warning mesage when reading the exif block
     91                // this triggers a warning message when reading the exif block
    9292                $out = wp_read_image_metadata(DIR_TESTDATA.'/images/waffles.jpg');
    9393
    9494                $this->assertEquals(0, $out['aperture']);
  • tests/phpunit/tests/mail.php

     
    102102
    103103                wp_mail( $to, $subject, $message, $headers );
    104104
    105                 // WordPress 3.2 and later correctly split the address into the two parts and send them seperately to PHPMailer
     105                // WordPress 3.2 and later correctly split the address into the two parts and send them separately to PHPMailer
    106106                // Earlier versions of PHPMailer were not touchy about the formatting of these arguments.
    107107
    108108                //retrieve the mailer instance
     
    126126
    127127                wp_mail( $to, $subject, $message );
    128128
    129                 // WordPress 3.2 and later correctly split the address into the two parts and send them seperately to PHPMailer
     129                // WordPress 3.2 and later correctly split the address into the two parts and send them separately to PHPMailer
    130130                // Earlier versions of PHPMailer were not touchy about the formatting of these arguments.
    131131                $mailer = tests_retrieve_phpmailer_instance();
    132132                $this->assertEquals( 'address@tld.com',                   $mailer->get_recipient( 'to' )->address );
  • tests/phpunit/tests/multisite/site.php

     
    960960         * @param string $value          The sanitized option value.
    961961         * @param string $option         The option name.
    962962         * @param string $original_value The original value passed to the function.
    963          * @return string The orginal value.
     963         * @return string The original value.
    964964         */
    965965        function filter_allow_unavailable_languages( $value, $option, $original_value ) {
    966966                return $original_value;
  • tests/phpunit/tests/post/objects.php

     
    2828                $this->assertEquals( 'dummy', get_post_meta( $id, 'post_type', true ) );
    2929                $this->assertEquals( 'post', $post->post_type );
    3030
    31                 // Excercise the output argument
     31                // Exercise the output argument
    3232                $post = get_post( $id, ARRAY_A );
    3333                $this->assertInternalType( 'array', $post );
    3434                $this->assertEquals( 'post', $post[ 'post_type' ] );
  • tests/phpunit/tests/query/search.php

     
    227227                        'post_status' => 'publish',
    228228                        'post_title' => '0',
    229229                        'post_content' => 'this post contains zeroes',
    230                         'post_excerpt' => 'this post containts zeroes',
     230                        'post_excerpt' => 'this post contains zeroes',
    231231                ) );
    232232
    233233                $q = new WP_Query( array(
     
    330330        }
    331331
    332332        /**
    333          * Unfiltered search queries for attachment post types should not inlcude
     333         * Unfiltered search queries for attachment post types should not include
    334334         * filenames to ensure the postmeta JOINs don't happen on the front end.
    335335         *
    336336         * @ticket 22744
  • tests/phpunit/tests/rest-api.php

     
    256256        }
    257257
    258258        /**
    259          * The 'methods' arg should a comma seperated string.
     259         * The 'methods' arg should a comma separated string.
    260260         */
    261         public function test_route_method_comma_seperated() {
     261        public function test_route_method_comma_separated() {
    262262                register_rest_route( 'test-ns', '/test', array(
    263263                        'methods'  => 'GET,POST',
    264264                        'callback' => '__return_null',
  • tests/phpunit/tests/user/capabilities.php

     
    671671        }
    672672
    673673        function test_role_add_cap() {
    674                 // change the capabilites associated with a role and make sure the change is reflected in has_cap()
     674                // change the capabilities associated with a role and make sure the change is reflected in has_cap()
    675675
    676676                global $wp_roles;
    677677                $role_name = rand_str();
     
    711711        }
    712712
    713713        function test_role_remove_cap() {
    714                 // change the capabilites associated with a role and make sure the change is reflected in has_cap()
     714                // change the capabilities associated with a role and make sure the change is reflected in has_cap()
    715715
    716716                global $wp_roles;
    717717                $role_name = rand_str();