Changeset 51331 for trunk/tests/phpunit/tests/functions.php
- Timestamp:
- 07/05/2021 05:21:53 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/functions.php
r50814 r51331 81 81 function test_wp_parse_args_boolean_strings() { 82 82 $args = wp_parse_args( 'foo=false&bar=true' ); 83 $this->assertI nternalType( 'string',$args['foo'] );84 $this->assertI nternalType( 'string',$args['bar'] );83 $this->assertIsString( $args['foo'] ); 84 $this->assertIsString( $args['bar'] ); 85 85 } 86 86 … … 582 582 $mimes = get_allowed_mime_types(); 583 583 584 $this->assertI nternalType( 'array',$mimes );584 $this->assertIsArray( $mimes ); 585 585 $this->assertNotEmpty( $mimes ); 586 586 587 587 add_filter( 'upload_mimes', '__return_empty_array' ); 588 588 $mimes = get_allowed_mime_types(); 589 $this->assertI nternalType( 'array',$mimes );589 $this->assertIsArray( $mimes ); 590 590 $this->assertEmpty( $mimes ); 591 591 592 592 remove_filter( 'upload_mimes', '__return_empty_array' ); 593 593 $mimes = get_allowed_mime_types(); 594 $this->assertI nternalType( 'array',$mimes );594 $this->assertIsArray( $mimes ); 595 595 $this->assertNotEmpty( $mimes ); 596 596 } … … 602 602 $mimes = wp_get_mime_types(); 603 603 604 $this->assertI nternalType( 'array',$mimes );604 $this->assertIsArray( $mimes ); 605 605 $this->assertNotEmpty( $mimes ); 606 606 607 607 add_filter( 'mime_types', '__return_empty_array' ); 608 608 $mimes = wp_get_mime_types(); 609 $this->assertI nternalType( 'array',$mimes );609 $this->assertIsArray( $mimes ); 610 610 $this->assertEmpty( $mimes ); 611 611 612 612 remove_filter( 'mime_types', '__return_empty_array' ); 613 613 $mimes = wp_get_mime_types(); 614 $this->assertI nternalType( 'array',$mimes );614 $this->assertIsArray( $mimes ); 615 615 $this->assertNotEmpty( $mimes ); 616 616 … … 618 618 add_filter( 'upload_mimes', '__return_empty_array' ); 619 619 $mimes = wp_get_mime_types(); 620 $this->assertI nternalType( 'array',$mimes );620 $this->assertIsArray( $mimes ); 621 621 $this->assertNotEmpty( $mimes ); 622 622 623 623 remove_filter( 'upload_mimes', '__return_empty_array' ); 624 624 $mimes2 = wp_get_mime_types(); 625 $this->assertI nternalType( 'array',$mimes2 );625 $this->assertIsArray( $mimes2 ); 626 626 $this->assertNotEmpty( $mimes2 ); 627 627 $this->assertSame( $mimes2, $mimes ); … … 911 911 $urls = wp_extract_urls( $blob ); 912 912 $this->assertNotEmpty( $urls ); 913 $this->assertI nternalType( 'array',$urls );913 $this->assertIsArray( $urls ); 914 914 $this->assertCount( count( $original_urls ), $urls ); 915 915 $this->assertSame( $original_urls, $urls ); … … 932 932 $urls = wp_extract_urls( $blob ); 933 933 $this->assertNotEmpty( $urls ); 934 $this->assertI nternalType( 'array',$urls );934 $this->assertIsArray( $urls ); 935 935 $this->assertCount( 8, $urls ); 936 936 $this->assertSame( array_slice( $original_urls, 0, 8 ), $urls ); … … 946 946 $urls = wp_extract_urls( $blob ); 947 947 $this->assertNotEmpty( $urls ); 948 $this->assertI nternalType( 'array',$urls );948 $this->assertIsArray( $urls ); 949 949 $this->assertCount( 8, $urls ); 950 950 $this->assertSame( array_slice( $original_urls, 0, 8 ), $urls ); … … 1067 1067 $extensions = wp_get_ext_types(); 1068 1068 1069 $this->assertI nternalType( 'array',$extensions );1069 $this->assertIsArray( $extensions ); 1070 1070 $this->assertNotEmpty( $extensions ); 1071 1071 … … 1076 1076 remove_filter( 'ext2type', '__return_empty_array' ); 1077 1077 $extensions = wp_get_ext_types(); 1078 $this->assertI nternalType( 'array',$extensions );1078 $this->assertIsArray( $extensions ); 1079 1079 $this->assertNotEmpty( $extensions ); 1080 1080 } … … 1198 1198 for ( $i = 0; $i < 20; $i += 1 ) { 1199 1199 $id = wp_unique_id(); 1200 $this->assertI nternalType( 'string',$id );1200 $this->assertIsString( $id ); 1201 1201 $this->assertTrue( is_numeric( $id ) ); 1202 1202 $ids[] = $id;
Note: See TracChangeset
for help on using the changeset viewer.