Changeset 33955 for trunk/tests/phpunit/tests/formatting/Autop.php
- Timestamp:
- 09/08/2015 10:54:08 PM (10 years ago)
- File:
-
- 1 edited
-
trunk/tests/phpunit/tests/formatting/Autop.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/formatting/Autop.php
r33624 r33955 329 329 ); 330 330 331 // Check whitespace normalization. 331 332 $content = array(); 332 333 … … 336 337 337 338 $expected = join( "\n", $content ); 338 $content = join( "\n\n", $content ); // WS difference 339 340 $this->assertEquals( $expected, trim( wpautop( $content ) ) ); 339 $input = join( "\n\n", $content ); // WS difference 340 341 $this->assertEquals( $expected, trim( wpautop( $input ) ) ); 342 343 $input = join( "", $content ); // WS difference 344 345 $this->assertEquals( $expected, trim( wpautop( $input ) ) ); 346 347 // Check whitespace addition. 348 $content = array(); 349 350 foreach ( $blocks as $block ) { 351 $content[] = "<$block/>"; 352 } 353 354 $expected = join( "\n", $content ); 355 $input = join( "", $content ); 356 357 $this->assertEquals( $expected, trim( wpautop( $input ) ) ); 358 359 // Check whitespace addition with attributes. 360 $content = array(); 361 362 foreach ( $blocks as $block ) { 363 $content[] = "<$block attr='value'>foo</$block>"; 364 } 365 366 $expected = join( "\n", $content ); 367 $input = join( "", $content ); 368 369 $this->assertEquals( $expected, trim( wpautop( $input ) ) ); 341 370 } 342 371 … … 421 450 "<p>Hello <!-- a\nhref='world' --></p>\n", 422 451 ), 452 array( 453 "Hello <!-- <object>\n<param>\n<param>\n<embed>\n</embed>\n</object>\n -->", 454 "<p>Hello <!-- <object>\n<param>\n<param>\n<embed>\n</embed>\n</object>\n --></p>\n", 455 ), 456 array( 457 "Hello <!-- <object>\n<param/>\n<param/>\n<embed>\n</embed>\n</object>\n -->", 458 "<p>Hello <!-- <object>\n<param/>\n<param/>\n<embed>\n</embed>\n</object>\n --></p>\n", 459 ), 423 460 /* Block elements inside comments will fail this test in all versions, it's not a regression. 424 461 array(
Note: See TracChangeset
for help on using the changeset viewer.