Ticket #38489: fix-spelling-phpunit.patch
File fix-spelling-phpunit.patch, 13.6 KB (added by , 8 years ago) |
---|
-
tests/phpunit/data/formatting/sizzle.js
17 17 rNonWord = /\W/; 18 18 19 19 // Here we check if the JavaScript engine is using some sort of 20 // optimization where it does not always call our comparis ion20 // optimization where it does not always call our comparison 21 21 // function. If that is the case, discard the hasDuplicate value. 22 22 // Thus far that includes Google Chrome. 23 23 [0, 0].sort(function() { -
tests/phpunit/data/formatting/whole-posts.php
719 719 <img class="alignright" src="http://www.example.com/postimages/2013/philipmetroid.jpg" alt="" width="50" height="50" /> 720 720 <p class="triangle-right right">PLOT TWIST</p> 721 721 <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 Sandw ich 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> 723 723 <img class="alignright" src="http://www.example.com/postimages/2013/philipmetroid.jpg" alt="" width="50" height="50" /> 724 724 <p class="triangle-right right">WHOA</p> 725 725 <img class="alignleft" src="http://www.example.com/postimages/2013/bobm.jpeg" alt="" width="50" height="50" /> -
tests/phpunit/data/formatting/xssAttacks.xml
689 689 <attack> 690 690 <name>Extraneous Open Brackets</name> 691 691 <code><<SCRIPT>alert("XSS");//<</SCRIPT></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> 693 693 <label>Embedded Character Attacks</label> 694 694 <browser>Browser support: [<span class="s">IE6.0</span>|<span class="s">NS8.1-IE</span>] [<span class="s">NS8.1-G</span>|<span class="s">FF1.5</span>] [<span class="s">O8.54</span>]</browser> 695 695 </attack> … … 969 969 <attack> 970 970 <name>Filter Evasion 2</name> 971 971 <code><SCRIPT a=">'>" SRC="http://ha.ckers.org/xss.js"></SCRIPT></code> 972 <desc>Here's an XSS example that bets on the fact that the regex won't catch a matching pair of quotes but will rather find any quotes to terminate a parameter string improperly.</desc>972 <desc>Here's an XSS example that bets on the fact that the regex won't catch a matchingg pair of quotes but will rather find any quotes to terminate a parameter string improperly.</desc> 973 973 <label>XSS w/HTML Quote Encapsulation</label> 974 974 <browser>Browser support: [<span class="s">IE6.0</span>|<span class="s">NS8.1-IE</span>] [<span class="s">NS8.1-G</span>|<span class="s">FF1.5</span>] [<span class="s">O8.54</span>]</browser> 975 975 </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
315 315 echo "\n"; 316 316 } 317 317 318 // mask out any input fields matching the given name318 // mask out any input fields matchingg the given name 319 319 function mask_input_value($in, $name='_wpnonce') { 320 320 return preg_replace('@<input([^>]*) name="'.preg_quote($name).'"([^>]*) value="[^>]*" />@', '<input$1 name="'.preg_quote($name).'"$2 value="***" />', $in); 321 321 } -
tests/phpunit/tests/cache.php
285 285 global $wp_object_cache; 286 286 287 287 if ( wp_using_ext_object_cache() ) { 288 // External caches will contain property values that contain non-matching resource IDs288 // External caches will contain property values that contain non-matchingg resource IDs 289 289 $this->assertInstanceOf( 'WP_Object_Cache', $wp_object_cache ); 290 290 } else { 291 291 $this->assertEquals( $wp_object_cache, $new_blank_cache_object ); -
tests/phpunit/tests/cron.php
44 44 $args = array('foo'); 45 45 46 46 wp_schedule_single_event( $timestamp, $hook, $args ); 47 // this returns the timestamp only if we provide matching args47 // this returns the timestamp only if we provide matchingg args 48 48 $this->assertEquals( $timestamp, wp_next_scheduled($hook, $args) ); 49 49 // these don't match so return nothing 50 50 $this->assertEquals( false, wp_next_scheduled($hook) ); … … 75 75 $args = array('foo'); 76 76 77 77 wp_schedule_event( $timestamp, 'hourly', $hook, $args ); 78 // this returns the timestamp only if we provide matching args78 // this returns the timestamp only if we provide matchingg args 79 79 $this->assertEquals( $timestamp, wp_next_scheduled($hook, $args) ); 80 80 // these don't match so return nothing 81 81 $this->assertEquals( false, wp_next_scheduled($hook) ); -
tests/phpunit/tests/dependencies/styles.php
112 112 } 113 113 114 114 /** 115 * Test if inline styles work with concat ination115 * Test if inline styles work with concatenation 116 116 * @global WP_Styles $wp_styles 117 117 * @ticket 24813 118 118 */ -
tests/phpunit/tests/formatting/Smilies.php
254 254 smilies_init(); 255 255 } 256 256 257 $orig_trans = $wpsmiliestrans; // save original tran lations array257 $orig_trans = $wpsmiliestrans; // save original translations array 258 258 259 259 $wpsmiliestrans = array ( 260 260 ':)' => 'simple-smile.png' -
tests/phpunit/tests/http/base.php
186 186 * @ticket 11888 187 187 */ 188 188 function test_send_headers() { 189 // Test that the headers sent are rec ieved by the server189 // Test that the headers sent are received by the server 190 190 $headers = array('test1' => 'test', 'test2' => 0, 'test3' => ''); 191 191 $res = wp_remote_request( $this->redirection_script . '?header-check', array('headers' => $headers) ); 192 192 -
tests/phpunit/tests/image/meta.php
88 88 function test_exif_error() { 89 89 90 90 // https://core.trac.wordpress.org/ticket/6571 91 // this triggers a warning mes age when reading the exif block91 // this triggers a warning message when reading the exif block 92 92 $out = wp_read_image_metadata(DIR_TESTDATA.'/images/waffles.jpg'); 93 93 94 94 $this->assertEquals(0, $out['aperture']); -
tests/phpunit/tests/mail.php
102 102 103 103 wp_mail( $to, $subject, $message, $headers ); 104 104 105 // WordPress 3.2 and later correctly split the address into the two parts and send them sep erately to PHPMailer105 // WordPress 3.2 and later correctly split the address into the two parts and send them separately to PHPMailer 106 106 // Earlier versions of PHPMailer were not touchy about the formatting of these arguments. 107 107 108 108 //retrieve the mailer instance … … 126 126 127 127 wp_mail( $to, $subject, $message ); 128 128 129 // WordPress 3.2 and later correctly split the address into the two parts and send them sep erately to PHPMailer129 // WordPress 3.2 and later correctly split the address into the two parts and send them separately to PHPMailer 130 130 // Earlier versions of PHPMailer were not touchy about the formatting of these arguments. 131 131 $mailer = tests_retrieve_phpmailer_instance(); 132 132 $this->assertEquals( 'address@tld.com', $mailer->get_recipient( 'to' )->address ); -
tests/phpunit/tests/multisite/site.php
960 960 * @param string $value The sanitized option value. 961 961 * @param string $option The option name. 962 962 * @param string $original_value The original value passed to the function. 963 * @return string The or ginal value.963 * @return string The original value. 964 964 */ 965 965 function filter_allow_unavailable_languages( $value, $option, $original_value ) { 966 966 return $original_value; -
tests/phpunit/tests/post/objects.php
28 28 $this->assertEquals( 'dummy', get_post_meta( $id, 'post_type', true ) ); 29 29 $this->assertEquals( 'post', $post->post_type ); 30 30 31 // Ex cercise the output argument31 // Exercise the output argument 32 32 $post = get_post( $id, ARRAY_A ); 33 33 $this->assertInternalType( 'array', $post ); 34 34 $this->assertEquals( 'post', $post[ 'post_type' ] ); -
tests/phpunit/tests/query/search.php
227 227 'post_status' => 'publish', 228 228 'post_title' => '0', 229 229 'post_content' => 'this post contains zeroes', 230 'post_excerpt' => 'this post contain ts zeroes',230 'post_excerpt' => 'this post contains zeroes', 231 231 ) ); 232 232 233 233 $q = new WP_Query( array( … … 330 330 } 331 331 332 332 /** 333 * Unfiltered search queries for attachment post types should not in lcude333 * Unfiltered search queries for attachment post types should not include 334 334 * filenames to ensure the postmeta JOINs don't happen on the front end. 335 335 * 336 336 * @ticket 22744 -
tests/phpunit/tests/rest-api.php
256 256 } 257 257 258 258 /** 259 * The 'methods' arg should a comma sep erated string.259 * The 'methods' arg should a comma separated string. 260 260 */ 261 public function test_route_method_comma_sep erated() {261 public function test_route_method_comma_separated() { 262 262 register_rest_route( 'test-ns', '/test', array( 263 263 'methods' => 'GET,POST', 264 264 'callback' => '__return_null', -
tests/phpunit/tests/user/capabilities.php
671 671 } 672 672 673 673 function test_role_add_cap() { 674 // change the capabilit es 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() 675 675 676 676 global $wp_roles; 677 677 $role_name = rand_str(); … … 711 711 } 712 712 713 713 function test_role_remove_cap() { 714 // change the capabilit es 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() 715 715 716 716 global $wp_roles; 717 717 $role_name = rand_str();