Changeset 36099
- Timestamp:
- 12/26/2015 04:50:23 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/shortcode.php
r36097 r36099 199 199 200 200 function test_positional_atts_mixed() { 201 $out = do_shortcode('[test-shortcode-tag 123 http ://wordpress.com/ 0 "foo" bar]');201 $out = do_shortcode('[test-shortcode-tag 123 https://wordpress.org/ 0 "foo" bar]'); 202 202 $this->assertEquals( '', $out ); 203 $this->assertEquals( array(0=>'123', 1=>'http ://wordpress.com/', 2=>'0', 3=>'foo', 4=>'bar'), $this->atts );203 $this->assertEquals( array(0=>'123', 1=>'https://wordpress.org/', 2=>'0', 3=>'foo', 4=>'bar'), $this->atts ); 204 204 $this->assertEquals( 'test-shortcode-tag', $this->tagname ); 205 205 } 206 206 207 207 function test_positional_and_named_atts() { 208 $out = do_shortcode('[test-shortcode-tag 123 url=http ://wordpress.com/ foo bar="baz"]');208 $out = do_shortcode('[test-shortcode-tag 123 url=https://wordpress.org/ foo bar="baz"]'); 209 209 $this->assertEquals( '', $out ); 210 $this->assertEquals( array(0=>'123', 'url' => 'http ://wordpress.com/', 1=>'foo', 'bar' => 'baz'), $this->atts );210 $this->assertEquals( array(0=>'123', 'url' => 'https://wordpress.org/', 1=>'foo', 'bar' => 'baz'), $this->atts ); 211 211 $this->assertEquals( 'test-shortcode-tag', $this->tagname ); 212 212 } … … 224 224 225 225 function test_nested_tags() { 226 $out = do_shortcode('[baztag][dumptag abc="foo" def=123 http ://wordpress.com/][/baztag]');227 $expected = "content = abc = foo\ndef = 123\n0 = http ://wordpress.com\n";226 $out = do_shortcode('[baztag][dumptag abc="foo" def=123 https://wordpress.org/][/baztag]'); 227 $expected = "content = abc = foo\ndef = 123\n0 = https://wordpress.org\n"; 228 228 $this->assertEquals($expected, $out); 229 229 }
Note: See TracChangeset
for help on using the changeset viewer.