- Timestamp:
- 08/13/2022 08:58:51 AM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/testcases/core/class-bp-media-extractor.php
r12840 r13314 59 59 foreach ( array( 'has', 'embeds', 'images', 'links', 'mentions', 'shortcodes', 'audio' ) as $key ) { 60 60 $this->assertArrayHasKey( $key, $media ); 61 $this->assertI nternalType( 'array',$media[ $key ] );61 $this->assertIsArray( $media[ $key ] ); 62 62 } 63 63 64 64 foreach ( $media['has'] as $item ) { 65 $this->assertI nternalType( 'int',$item );65 $this->assertIsInt( $item ); 66 66 } 67 67 68 68 foreach ( $media['links'] as $item ) { 69 69 $this->assertArrayHasKey( 'url', $item ); 70 $this->assertI nternalType( 'string',$item['url'] );70 $this->assertIsString( $item['url'] ); 71 71 $this->assertNotEmpty( $item['url'] ); 72 72 } … … 74 74 foreach ( $media['mentions'] as $item ) { 75 75 $this->assertArrayHasKey( 'name', $item ); 76 $this->assertI nternalType( 'string',$item['name'] );76 $this->assertIsString( $item['name'] ); 77 77 $this->assertNotEmpty( $item['name'] ); 78 78 } … … 80 80 foreach ( $media['images'] as $item ) { 81 81 $this->assertArrayHasKey( 'height', $item ); 82 $this->assertI nternalType( 'int',$item['height'] );82 $this->assertIsInt( $item['height'] ); 83 83 84 84 $this->assertArrayHasKey( 'width', $item ); 85 $this->assertI nternalType( 'int',$item['width'] );85 $this->assertIsInt( $item['width'] ); 86 86 87 87 $this->assertArrayHasKey( 'source', $item ); 88 $this->assertI nternalType( 'string',$item['source'] );88 $this->assertIsString( $item['source'] ); 89 89 $this->assertNotEmpty( $item['source'] ); 90 90 91 91 $this->assertArrayHasKey( 'url', $item ); 92 $this->assertI nternalType( 'string',$item['url'] );92 $this->assertIsString( $item['url'] ); 93 93 $this->assertNotEmpty( $item['url'] ); 94 94 } … … 96 96 foreach ( $media['shortcodes'] as $shortcode_type => $item ) { 97 97 $this->assertArrayHasKey( 'attributes', $item ); 98 $this->assertI nternalType( 'array',$item['attributes'] );98 $this->assertIsArray( $item['attributes'] ); 99 99 100 100 $this->assertArrayHasKey( 'content', $item ); 101 $this->assertI nternalType( 'string',$item['content'] );101 $this->assertIsString( $item['content'] ); 102 102 103 103 $this->assertArrayHasKey( 'type', $item ); 104 $this->assertI nternalType( 'string',$item['type'] );104 $this->assertIsString( $item['type'] ); 105 105 106 106 $this->assertArrayHasKey( 'original', $item ); 107 $this->assertI nternalType( 'string',$item['original'] );107 $this->assertIsString( $item['original'] ); 108 108 } 109 109 110 110 foreach ( $media['embeds'] as $item ) { 111 111 $this->assertArrayHasKey( 'url', $item ); 112 $this->assertI nternalType( 'string',$item['url'] );112 $this->assertIsString( $item['url'] ); 113 113 $this->assertNotEmpty( $item['url'] ); 114 114 } … … 116 116 foreach ( $media['audio'] as $item ) { 117 117 $this->assertArrayHasKey( 'url', $item ); 118 $this->assertI nternalType( 'string',$item['url'] );118 $this->assertIsString( $item['url'] ); 119 119 $this->assertNotEmpty( $item['url'] ); 120 120 121 121 $this->assertArrayHasKey( 'source', $item ); 122 $this->assertI nternalType( 'string',$item['source'] );122 $this->assertIsString( $item['source'] ); 123 123 $this->assertNotEmpty( $item['source'] ); 124 124 }
Note: See TracChangeset
for help on using the changeset viewer.