| | 330 | * @ticket 14050 |
| | 331 | */ |
| | 332 | function test_shortcode_unautop_multiline() { |
| | 333 | // test a sample html structure |
| | 334 | $test_string = <<<EOF |
| | 335 | <h1>Fun, safe, small group tours & no roughing it</h1> |
| | 336 | [footag] |
| | 337 | <p>Enjoy guided day walks in extraordinary natural areas. Return to comfortable accommodation and delicious meals each evening. No heavy backpack, no camping.</p> |
| | 338 | [/footag] |
| | 339 | |
| | 340 | EOF; |
| | 341 | $actual = shortcode_unautop( wpautop( $test_string ) ); |
| | 342 | $this->assertEquals( $test_string, $actual ); |
| | 343 | } |
| | 344 | |
| | 345 | /** |
| | 346 | * @ticket 14050 |
| | 347 | */ |
| | 348 | function test_shortcode_unautop_attributes() { |
| | 349 | // a blank line is added at the end, so test with it already there |
| | 350 | $test_string = "[footag id=\"2\" class=\"bar\"]\n"; |
| | 351 | $actual = shortcode_unautop( wpautop( $test_string ) ); |
| | 352 | $this->assertEquals( $test_string, $actual ); |
| | 353 | } |
| | 354 | |
| | 355 | /** |
| | 356 | * @ticket 14050 |
| | 357 | */ |
| | 358 | function test_shortcode_unautop_attributes_multiline() { |
| | 359 | // a blank line is added at the end, so test with it already there |
| | 360 | $test_string = <<<EOF |
| | 361 | [footag id="2" class="bar"] |
| | 362 | <p>Enjoy guided day walks in extraordinary natural areas. Return to comfortable accommodation and delicious meals each evening. No heavy backpack, no camping.</p> |
| | 363 | [/footag] |
| | 364 | |
| | 365 | EOF; |
| | 366 | $actual = shortcode_unautop( wpautop( $test_string ) ); |
| | 367 | $this->assertEquals( $test_string, $actual ); |
| | 368 | } |
| | 369 | |
| | 370 | /** |