diff --git tests/phpunit/tests/shortcode.php tests/phpunit/tests/shortcode.php
index 2a966bf..e6b1e58 100644
|
|
EOF; |
299 | 299 | } |
300 | 300 | |
301 | 301 | /** |
| 302 | * Tests `shortcode_unautop` on multiple shortcodes |
| 303 | * |
302 | 304 | * @ticket 14050 |
| 305 | * @dataProvider data_shortcode_unautop |
303 | 306 | */ |
304 | | function test_shortcode_unautop() { |
305 | | // a blank line is added at the end, so test with it already there |
306 | | $test_string = "[footag]\n"; |
307 | | $this->assertEquals( $test_string, shortcode_unautop( wpautop( $test_string ) ) ); |
| 307 | function test_shortcode_unautop( $test_string ) { |
| 308 | $this->assertEquals( trim( $test_string ), trim( shortcode_unautop( wpautop( $test_string ) ) ) ); |
| 309 | } |
| 310 | |
| 311 | function data_shortcode_unautop() { |
| 312 | return array( |
| 313 | 'single-shortcode' => array( "[footag]\n" ), |
| 314 | 'two-shortcodes-same-line' => array( "[footag][footag]\n" ), |
| 315 | 'two-shortcodes-one-line-apart' => array( "[footag]\n[footag]\n" ), |
| 316 | 'two-shortcodes-two-lines-apart' => array( "[footag]\n\n[footag]\n" ), |
| 317 | ); |
308 | 318 | } |
309 | 319 | |
310 | 320 | /** |