Changeset 57597 for trunk/tests/phpunit/tests/shortcode.php
- Timestamp:
- 02/12/2024 04:06:47 PM (15 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/shortcode.php
r56548 r57597 106 106 } 107 107 108 /** 109 * @ticket 59249 110 */ 108 111 public function test_noatts() { 109 112 do_shortcode( '[test-shortcode-tag /]' ); 110 $this->assertSame( '', $this->atts ); 113 $this->assertIsArray( $this->atts ); 114 $this->assertEmpty( $this->atts ); 111 115 $this->assertSame( 'test-shortcode-tag', $this->tagname ); 112 116 } … … 182 186 } 183 187 188 /** 189 * @ticket 59249 190 */ 184 191 public function test_noatts_enclosing() { 185 192 do_shortcode( '[test-shortcode-tag]content[/test-shortcode-tag]' ); 186 $this->assertSame( '', $this->atts ); 193 $this->assertIsArray( $this->atts ); 194 $this->assertEmpty( $this->atts ); 187 195 $this->assertSame( 'content', $this->content ); 188 196 $this->assertSame( 'test-shortcode-tag', $this->tagname ); … … 209 217 } 210 218 219 /** 220 * @ticket 59249 221 */ 211 222 public function test_unclosed() { 212 223 $out = do_shortcode( '[test-shortcode-tag]' ); 213 224 $this->assertSame( '', $out ); 214 $this->assertSame( '', $this->atts ); 225 $this->assertIsArray( $this->atts ); 226 $this->assertEmpty( $this->atts ); 215 227 $this->assertSame( 'test-shortcode-tag', $this->tagname ); 216 228 } … … 999 1011 $this->assertSame( 'test-shortcode-tag', $this->tagname ); 1000 1012 } 1013 1014 /** 1015 * @ticket 59249 1016 */ 1017 public function test_shortcode_parse_atts_empty() { 1018 $out = shortcode_parse_atts( '' ); 1019 $this->assertIsArray( $out, 'Return value is not an array' ); 1020 $this->assertEmpty( $out, 'Returned array is not empty' ); 1021 } 1001 1022 }
Note: See TracChangeset
for help on using the changeset viewer.