Changeset 42343 for trunk/tests/phpunit/tests/functions.php
- Timestamp:
- 11/30/2017 11:09:33 PM (9 years ago)
- File:
-
- 1 edited
-
trunk/tests/phpunit/tests/functions.php (modified) (30 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/functions.php
r42011 r42343 6 6 class Tests_Functions extends WP_UnitTestCase { 7 7 function test_wp_parse_args_object() { 8 $x = new MockClass;8 $x = new MockClass; 9 9 $x->_baba = 5; 10 $x->yZ = "baba"; 11 $x->a = array(5, 111, 'x'); 12 $this->assertEquals(array('_baba' => 5, 'yZ' => 'baba', 'a' => array(5, 111, 'x')), wp_parse_args($x)); 10 $x->yZ = 'baba'; 11 $x->a = array( 5, 111, 'x' ); 12 $this->assertEquals( 13 array( 14 '_baba' => 5, 15 'yZ' => 'baba', 16 'a' => array( 5, 111, 'x' ), 17 ), wp_parse_args( $x ) 18 ); 13 19 $y = new MockClass; 14 $this->assertEquals( array(), wp_parse_args($y));15 } 16 17 function test_wp_parse_args_array() {20 $this->assertEquals( array(), wp_parse_args( $y ) ); 21 } 22 23 function test_wp_parse_args_array() { 18 24 // arrays 19 25 $a = array(); 20 $this->assertEquals(array(), wp_parse_args($a)); 21 $b = array('_baba' => 5, 'yZ' => 'baba', 'a' => array(5, 111, 'x')); 22 $this->assertEquals(array('_baba' => 5, 'yZ' => 'baba', 'a' => array(5, 111, 'x')), wp_parse_args($b)); 26 $this->assertEquals( array(), wp_parse_args( $a ) ); 27 $b = array( 28 '_baba' => 5, 29 'yZ' => 'baba', 30 'a' => array( 5, 111, 'x' ), 31 ); 32 $this->assertEquals( 33 array( 34 '_baba' => 5, 35 'yZ' => 'baba', 36 'a' => array( 5, 111, 'x' ), 37 ), wp_parse_args( $b ) 38 ); 23 39 } 24 40 25 41 function test_wp_parse_args_defaults() { 26 $x = new MockClass;42 $x = new MockClass; 27 43 $x->_baba = 5; 28 $x->yZ = "baba"; 29 $x->a = array(5, 111, 'x'); 30 $d = array('pu' => 'bu'); 31 $this->assertEquals(array('pu' => 'bu', '_baba' => 5, 'yZ' => 'baba', 'a' => array(5, 111, 'x')), wp_parse_args($x, $d)); 32 $e = array('_baba' => 6); 33 $this->assertEquals(array('_baba' => 5, 'yZ' => 'baba', 'a' => array(5, 111, 'x')), wp_parse_args($x, $e)); 44 $x->yZ = 'baba'; 45 $x->a = array( 5, 111, 'x' ); 46 $d = array( 'pu' => 'bu' ); 47 $this->assertEquals( 48 array( 49 'pu' => 'bu', 50 '_baba' => 5, 51 'yZ' => 'baba', 52 'a' => array( 5, 111, 'x' ), 53 ), wp_parse_args( $x, $d ) 54 ); 55 $e = array( '_baba' => 6 ); 56 $this->assertEquals( 57 array( 58 '_baba' => 5, 59 'yZ' => 'baba', 60 'a' => array( 5, 111, 'x' ), 61 ), wp_parse_args( $x, $e ) 62 ); 34 63 } 35 64 36 65 function test_wp_parse_args_other() { 37 66 $b = true; 38 wp_parse_str( $b, $s);39 $this->assertEquals( $s, wp_parse_args($b));67 wp_parse_str( $b, $s ); 68 $this->assertEquals( $s, wp_parse_args( $b ) ); 40 69 $q = 'x=5&_baba=dudu&'; 41 wp_parse_str( $q, $ss);42 $this->assertEquals( $ss, wp_parse_args($q));70 wp_parse_str( $q, $ss ); 71 $this->assertEquals( $ss, wp_parse_args( $q ) ); 43 72 } 44 73 … … 73 102 'C:\\WINDOWS', 74 103 '\\\\sambashare\\foo', 75 ); 76 foreach ($absolute_paths as $path) 77 $this->assertTrue( path_is_absolute($path), "path_is_absolute('$path') should return true" ); 104 ); 105 foreach ( $absolute_paths as $path ) { 106 $this->assertTrue( path_is_absolute( $path ), "path_is_absolute('$path') should return true" ); 107 } 78 108 } 79 109 … … 90 120 'FOO', 91 121 '..\\WINDOWS', 92 ); 93 foreach ($relative_paths as $path) 94 $this->assertFalse( path_is_absolute($path), "path_is_absolute('$path') should return false" ); 122 ); 123 foreach ( $relative_paths as $path ) { 124 $this->assertFalse( path_is_absolute( $path ), "path_is_absolute('$path') should return false" ); 125 } 95 126 } 96 127 … … 142 173 143 174 // check with single quotes in name (somehow) 144 $this->assertEquals( "abcdefgh.png", wp_unique_filename( $testdir, "abcdefg'h.png" ), 'File with quote failed' );175 $this->assertEquals( 'abcdefgh.png', wp_unique_filename( $testdir, "abcdefg'h.png" ), 'File with quote failed' ); 145 176 146 177 // check with single quotes in name (somehow) 147 $this->assertEquals( "abcdefgh.png", wp_unique_filename( $testdir, 'abcdefg"h.png' ), 'File with quote failed' );178 $this->assertEquals( 'abcdefgh.png', wp_unique_filename( $testdir, 'abcdefg"h.png' ), 'File with quote failed' ); 148 179 149 180 // test crazy name (useful for regression tests) … … 158 189 function test_is_serialized() { 159 190 $cases = array( 160 serialize(null), 161 serialize(true), 162 serialize(false), 163 serialize(-25), 164 serialize(25), 165 serialize(1.1), 166 serialize('this string will be serialized'), 167 serialize("a\nb"), 168 serialize(array()), 169 serialize(array(1,1,2,3,5,8,13)), 170 serialize( (object)array('test' => true, '3', 4) ) 171 ); 172 foreach ( $cases as $case ) 173 $this->assertTrue( is_serialized($case), "Serialized data: $case" ); 191 serialize( null ), 192 serialize( true ), 193 serialize( false ), 194 serialize( -25 ), 195 serialize( 25 ), 196 serialize( 1.1 ), 197 serialize( 'this string will be serialized' ), 198 serialize( "a\nb" ), 199 serialize( array() ), 200 serialize( array( 1, 1, 2, 3, 5, 8, 13 ) ), 201 serialize( 202 (object) array( 203 'test' => true, 204 '3', 205 4, 206 ) 207 ), 208 ); 209 foreach ( $cases as $case ) { 210 $this->assertTrue( is_serialized( $case ), "Serialized data: $case" ); 211 } 174 212 175 213 $not_serialized = array( 176 214 'a string', 177 215 'garbage:a:0:garbage;', 178 's:4:test;' 179 ); 180 foreach ( $not_serialized as $case ) 181 $this->assertFalse( is_serialized($case), "Test data: $case" ); 216 's:4:test;', 217 ); 218 foreach ( $not_serialized as $case ) { 219 $this->assertFalse( is_serialized( $case ), "Test data: $case" ); 220 } 182 221 } 183 222 … … 255 294 $this->assertEquals( "$url?foo=1", add_query_arg( 'foo', '1', $url ) ); 256 295 $this->assertEquals( "$url?foo=1", add_query_arg( array( 'foo' => '1' ), $url ) ); 257 $this->assertEquals( "$url?foo=2", add_query_arg( array( 'foo' => '1', 'foo' => '2' ), $url ) ); 258 $this->assertEquals( "$url?foo=1&bar=2", add_query_arg( array( 'foo' => '1', 'bar' => '2' ), $url ) ); 296 $this->assertEquals( 297 "$url?foo=2", add_query_arg( 298 array( 299 'foo' => '1', 300 'foo' => '2', 301 ), $url 302 ) 303 ); 304 $this->assertEquals( 305 "$url?foo=1&bar=2", add_query_arg( 306 array( 307 'foo' => '1', 308 'bar' => '2', 309 ), $url 310 ) 311 ); 259 312 260 313 $_SERVER['REQUEST_URI'] = $url; … … 262 315 $this->assertEquals( "$url?foo=1", add_query_arg( 'foo', '1' ) ); 263 316 $this->assertEquals( "$url?foo=1", add_query_arg( array( 'foo' => '1' ) ) ); 264 $this->assertEquals( "$url?foo=2", add_query_arg( array( 'foo' => '1', 'foo' => '2' ) ) ); 265 $this->assertEquals( "$url?foo=1&bar=2", add_query_arg( array( 'foo' => '1', 'bar' => '2' ) ) ); 317 $this->assertEquals( 318 "$url?foo=2", add_query_arg( 319 array( 320 'foo' => '1', 321 'foo' => '2', 322 ) 323 ) 324 ); 325 $this->assertEquals( 326 "$url?foo=1&bar=2", add_query_arg( 327 array( 328 'foo' => '1', 329 'bar' => '2', 330 ) 331 ) 332 ); 266 333 } 267 334 268 335 foreach ( $frag_urls as $frag_url ) { 269 336 $_SERVER['REQUEST_URI'] = 'nothing'; 270 $url = str_replace( '#frag', '', $frag_url );337 $url = str_replace( '#frag', '', $frag_url ); 271 338 272 339 $this->assertEquals( "$url?foo=1#frag", add_query_arg( 'foo', '1', $frag_url ) ); 273 340 $this->assertEquals( "$url?foo=1#frag", add_query_arg( array( 'foo' => '1' ), $frag_url ) ); 274 $this->assertEquals( "$url?foo=2#frag", add_query_arg( array( 'foo' => '1', 'foo' => '2' ), $frag_url ) ); 275 $this->assertEquals( "$url?foo=1&bar=2#frag", add_query_arg( array( 'foo' => '1', 'bar' => '2' ), $frag_url ) ); 341 $this->assertEquals( 342 "$url?foo=2#frag", add_query_arg( 343 array( 344 'foo' => '1', 345 'foo' => '2', 346 ), $frag_url 347 ) 348 ); 349 $this->assertEquals( 350 "$url?foo=1&bar=2#frag", add_query_arg( 351 array( 352 'foo' => '1', 353 'bar' => '2', 354 ), $frag_url 355 ) 356 ); 276 357 277 358 $_SERVER['REQUEST_URI'] = $frag_url; … … 279 360 $this->assertEquals( "$url?foo=1#frag", add_query_arg( 'foo', '1' ) ); 280 361 $this->assertEquals( "$url?foo=1#frag", add_query_arg( array( 'foo' => '1' ) ) ); 281 $this->assertEquals( "$url?foo=2#frag", add_query_arg( array( 'foo' => '1', 'foo' => '2' ) ) ); 282 $this->assertEquals( "$url?foo=1&bar=2#frag", add_query_arg( array( 'foo' => '1', 'bar' => '2' ) ) ); 362 $this->assertEquals( 363 "$url?foo=2#frag", add_query_arg( 364 array( 365 'foo' => '1', 366 'foo' => '2', 367 ) 368 ) 369 ); 370 $this->assertEquals( 371 "$url?foo=1&bar=2#frag", add_query_arg( 372 array( 373 'foo' => '1', 374 'bar' => '2', 375 ) 376 ) 377 ); 283 378 } 284 379 … … 300 395 $this->assertEquals( "$url&foo=1", add_query_arg( 'foo', '1', $url ) ); 301 396 $this->assertEquals( "$url&foo=1", add_query_arg( array( 'foo' => '1' ), $url ) ); 302 $this->assertEquals( "$url&foo=2", add_query_arg( array( 'foo' => '1', 'foo' => '2' ), $url ) ); 303 $this->assertEquals( "$url&foo=1&bar=2", add_query_arg( array( 'foo' => '1', 'bar' => '2' ), $url ) ); 397 $this->assertEquals( 398 "$url&foo=2", add_query_arg( 399 array( 400 'foo' => '1', 401 'foo' => '2', 402 ), $url 403 ) 404 ); 405 $this->assertEquals( 406 "$url&foo=1&bar=2", add_query_arg( 407 array( 408 'foo' => '1', 409 'bar' => '2', 410 ), $url 411 ) 412 ); 304 413 305 414 $_SERVER['REQUEST_URI'] = $url; … … 307 416 $this->assertEquals( "$url&foo=1", add_query_arg( 'foo', '1' ) ); 308 417 $this->assertEquals( "$url&foo=1", add_query_arg( array( 'foo' => '1' ) ) ); 309 $this->assertEquals( "$url&foo=2", add_query_arg( array( 'foo' => '1', 'foo' => '2' ) ) ); 310 $this->assertEquals( "$url&foo=1&bar=2", add_query_arg( array( 'foo' => '1', 'bar' => '2' ) ) ); 418 $this->assertEquals( 419 "$url&foo=2", add_query_arg( 420 array( 421 'foo' => '1', 422 'foo' => '2', 423 ) 424 ) 425 ); 426 $this->assertEquals( 427 "$url&foo=1&bar=2", add_query_arg( 428 array( 429 'foo' => '1', 430 'bar' => '2', 431 ) 432 ) 433 ); 311 434 } 312 435 … … 319 442 function test_add_query_arg_numeric_keys() { 320 443 $url = add_query_arg( array( 'foo' => 'bar' ), '1=1' ); 321 $this->assertEquals('1=1&foo=bar', $url); 322 323 $url = add_query_arg( array( 'foo' => 'bar', '1' => '2' ), '1=1' ); 324 $this->assertEquals('1=2&foo=bar', $url); 444 $this->assertEquals( '1=1&foo=bar', $url ); 445 446 $url = add_query_arg( 447 array( 448 'foo' => 'bar', 449 '1' => '2', 450 ), '1=1' 451 ); 452 $this->assertEquals( '1=2&foo=bar', $url ); 325 453 326 454 $url = add_query_arg( array( '1' => '2' ), 'foo=bar' ); 327 $this->assertEquals( 'foo=bar&1=2', $url);455 $this->assertEquals( 'foo=bar&1=2', $url ); 328 456 } 329 457 … … 387 515 388 516 update_option( 'blog_charset', 'utf8' ); 389 $this->assertEquals( 'UTF-8', get_option( 'blog_charset' ) );517 $this->assertEquals( 'UTF-8', get_option( 'blog_charset' ) ); 390 518 391 519 update_option( 'blog_charset', 'utf-8' ); 392 $this->assertEquals( 'UTF-8', get_option( 'blog_charset' ) );520 $this->assertEquals( 'UTF-8', get_option( 'blog_charset' ) ); 393 521 394 522 update_option( 'blog_charset', 'UTF8' ); 395 $this->assertEquals( 'UTF-8', get_option( 'blog_charset' ) );523 $this->assertEquals( 'UTF-8', get_option( 'blog_charset' ) ); 396 524 397 525 update_option( 'blog_charset', 'UTF-8' ); 398 $this->assertEquals( 'UTF-8', get_option( 'blog_charset' ) );526 $this->assertEquals( 'UTF-8', get_option( 'blog_charset' ) ); 399 527 400 528 update_option( 'blog_charset', 'ISO-8859-1' ); 401 $this->assertEquals( 'ISO-8859-1', get_option( 'blog_charset' ) );529 $this->assertEquals( 'ISO-8859-1', get_option( 'blog_charset' ) ); 402 530 403 531 update_option( 'blog_charset', 'ISO8859-1' ); 404 $this->assertEquals( 'ISO-8859-1', get_option( 'blog_charset' ) );532 $this->assertEquals( 'ISO-8859-1', get_option( 'blog_charset' ) ); 405 533 406 534 update_option( 'blog_charset', 'iso8859-1' ); 407 $this->assertEquals( 'ISO-8859-1', get_option( 'blog_charset' ) );535 $this->assertEquals( 'ISO-8859-1', get_option( 'blog_charset' ) ); 408 536 409 537 update_option( 'blog_charset', 'iso-8859-1' ); 410 $this->assertEquals( 'ISO-8859-1', get_option( 'blog_charset' ) );538 $this->assertEquals( 'ISO-8859-1', get_option( 'blog_charset' ) ); 411 539 412 540 // Arbitrary strings are passed through. 413 541 update_option( 'blog_charset', 'foobarbaz' ); 414 $this->assertEquals( 'foobarbaz', get_option( 'blog_charset' ) );542 $this->assertEquals( 'foobarbaz', get_option( 'blog_charset' ) ); 415 543 416 544 update_option( 'blog_charset', $orig_blog_charset ); … … 457 585 function test_device_can_upload( $user_agent, $expected ) { 458 586 $_SERVER['HTTP_USER_AGENT'] = $user_agent; 459 $actual = _device_can_upload();587 $actual = _device_can_upload(); 460 588 unset( $_SERVER['HTTP_USER_AGENT'] ); 461 589 $this->assertEquals( $expected, $actual ); … … 572 700 'ftp://127.0.0.1/', 573 701 'http://www.woo.com/video?v=exvUH2qKLTU', 574 'http://taco.com?burrito=enchilada#guac' 575 ); 576 577 $blob = "702 'http://taco.com?burrito=enchilada#guac', 703 ); 704 705 $blob = ' 578 706 http://woo.com/1,2,3,4,5,6/-1-2-3-4-/woo.html 579 707 … … 635 763 636 764 http://taco.com?burrito=enchilada#guac 637 ";765 '; 638 766 639 767 $urls = wp_extract_urls( $blob ); … … 650 778 $this->assertEquals( $original_urls, $decoded ); 651 779 652 $blob = "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor780 $blob = 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor 653 781 incididunt ut labore http://woo.com/1,2,3,4,5,6/-1-2-3-4-/woo.html et dolore magna aliqua. 654 782 Ut http://this.com enim ad minim veniam, quis nostrud exercitation 16.06. to 18.06.2014 ullamco http://127.0.0.1 655 783 laboris nisi ut aliquip ex http://www111.urwyeoweytwutreyytqytwetowteuiiu.com/?346236346326&2134362574863.437 ea 656 784 commodo consequat. http://wordpress-core/1,2,3,4,5,6/-1-2-3-4-/woo.html Duis aute irure dolor in reprehenderit in voluptate 657 velit esse http://wordpress-core.com:8080/ cillum dolore eu fugiat nulla <A href= \"http://www.website.com:5000\">http://www.website.com:5000</B> pariatur. Excepteur sint occaecat cupidatat non proident,658 sunt in culpa qui officia deserunt mollit http://wordpress-core/?346236346326&2134362574863.437 anim id est laborum. ";785 velit esse http://wordpress-core.com:8080/ cillum dolore eu fugiat nulla <A href="http://www.website.com:5000">http://www.website.com:5000</B> pariatur. Excepteur sint occaecat cupidatat non proident, 786 sunt in culpa qui officia deserunt mollit http://wordpress-core/?346236346326&2134362574863.437 anim id est laborum.'; 659 787 660 788 $urls = wp_extract_urls( $blob ); … … 708 836 709 837 $eucjp = mb_convert_encoding( 'aあb', 'EUC-JP', 'UTF-8' ); 710 $utf8 = mb_convert_encoding( $eucjp, 'UTF-8', 'EUC-JP' );838 $utf8 = mb_convert_encoding( $eucjp, 'UTF-8', 'EUC-JP' ); 711 839 712 840 $this->assertEquals( 'aあb', $utf8 ); … … 732 860 733 861 $eucjp = mb_convert_encoding( 'aあb', 'EUC-JP', 'UTF-8' ); 734 $utf8 = mb_convert_encoding( $eucjp, 'UTF-8', 'EUC-JP' );862 $utf8 = mb_convert_encoding( $eucjp, 'UTF-8', 'EUC-JP' ); 735 863 736 864 $this->assertEquals( 'aあb', $utf8 ); … … 752 880 */ 753 881 function test_wp_json_encode_object() { 754 $object = new stdClass;882 $object = new stdClass; 755 883 $object->a = 'b'; 756 884 $this->assertEquals( wp_json_encode( $object ), '{"a":"b"}' ); … … 783 911 $this->assertEquals( '', $actual ); 784 912 785 $GLOBALS['post'] = self::factory()->post->create_and_get( array( 786 'post_date' => '2015-09-16 08:00:00' 787 ) ); 913 $GLOBALS['post'] = self::factory()->post->create_and_get( 914 array( 915 'post_date' => '2015-09-16 08:00:00', 916 ) 917 ); 788 918 789 919 ob_start(); … … 831 961 array( '2016-03-02T19:13:00', '2016-03-02 19:13' ), 832 962 array( '2016-03-02T19:13:00', '16-03-02 19:13' ), 833 array( '2016-03-02T19:13:00', '16-03-02 19:13' ) 963 array( '2016-03-02T19:13:00', '16-03-02 19:13' ), 834 964 ); 835 965 } … … 884 1014 885 1015 $ini_limit_before = ini_get( 'memory_limit' ); 886 $raised_limit = wp_raise_memory_limit();887 $ini_limit_after = ini_get( 'memory_limit' );1016 $raised_limit = wp_raise_memory_limit(); 1017 $ini_limit_after = ini_get( 'memory_limit' ); 888 1018 889 1019 $this->assertSame( $ini_limit_before, $ini_limit_after ); … … 993 1123 } 994 1124 995 $file = DIR_TESTDATA . '/uploads/video-play.svg';1125 $file = DIR_TESTDATA . '/uploads/video-play.svg'; 996 1126 $filename = 'video-play.svg'; 997 1127 998 1128 $expected = array( 999 'ext' => 'svg',1000 'type' => 'image/svg+xml',1129 'ext' => 'svg', 1130 'type' => 'image/svg+xml', 1001 1131 'proper_filename' => false, 1002 1132 ); … … 1018 1148 } 1019 1149 1020 $file = DIR_TESTDATA . '/uploads/dashicons.woff';1150 $file = DIR_TESTDATA . '/uploads/dashicons.woff'; 1021 1151 $filename = 'dashicons.woff'; 1022 1152 1023 1153 $expected = array( 1024 'ext' => 'woff',1025 'type' => 'application/font-woff',1154 'ext' => 'woff', 1155 'type' => 'application/font-woff', 1026 1156 'proper_filename' => false, 1027 1157 ); … … 1086 1216 'canola.jpg', 1087 1217 array( 1088 'ext' => 'jpg',1089 'type' => 'image/jpeg',1218 'ext' => 'jpg', 1219 'type' => 'image/jpeg', 1090 1220 'proper_filename' => false, 1091 1221 ), … … 1096 1226 'test-image-mime-jpg.png', 1097 1227 array( 1098 'ext' => 'jpg',1099 'type' => 'image/jpeg',1228 'ext' => 'jpg', 1229 'type' => 'image/jpeg', 1100 1230 'proper_filename' => 'test-image-mime-jpg.jpg', 1101 1231 ), … … 1106 1236 'test-image-no-extension', 1107 1237 array( 1108 'ext' => false,1109 'type' => false,1238 'ext' => false, 1239 'type' => false, 1110 1240 'proper_filename' => false, 1111 1241 ), … … 1116 1246 'big5.jpg', 1117 1247 array( 1118 'ext' => 'jpg',1119 'type' => 'image/jpeg',1248 'ext' => 'jpg', 1249 'type' => 'image/jpeg', 1120 1250 'proper_filename' => false, 1121 1251 ), … … 1126 1256 'crazy-cdata.xml', 1127 1257 array( 1128 'ext' => false,1129 'type' => false,1258 'ext' => false, 1259 'type' => false, 1130 1260 'proper_filename' => false, 1131 1261 ), … … 1135 1265 // Test a few additional file types on single sites. 1136 1266 if ( ! is_multisite() ) { 1137 $data = array_merge( $data, array( 1138 // Standard non-image file. 1139 array( 1140 DIR_TESTDATA . '/formatting/big5.txt', 1141 'big5.txt', 1267 $data = array_merge( 1268 $data, array( 1269 // Standard non-image file. 1270 array( 1271 DIR_TESTDATA . '/formatting/big5.txt', 1272 'big5.txt', 1273 array( 1274 'ext' => 'txt', 1275 'type' => 'text/plain', 1276 'proper_filename' => false, 1277 ), 1278 ), 1279 // Non-image file with wrong sub-type. 1142 1280 array( 1143 'ext' => 'txt', 1144 'type' => 'text/plain', 1145 'proper_filename' => false, 1281 DIR_TESTDATA . '/uploads/pages-to-word.docx', 1282 'pages-to-word.docx', 1283 array( 1284 'ext' => 'docx', 1285 'type' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', 1286 'proper_filename' => false, 1287 ), 1146 1288 ), 1147 ), 1148 // Non-image file with wrong sub-type. 1149 array( 1150 DIR_TESTDATA . '/uploads/pages-to-word.docx', 1151 'pages-to-word.docx', 1152 array( 1153 'ext' => 'docx', 1154 'type' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', 1155 'proper_filename' => false, 1156 ), 1157 ), 1158 ) ); 1289 ) 1290 ); 1159 1291 } 1160 1292
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)