WordPress.org

Make WordPress Core

Changeset 575 in tests


Ignore:
Timestamp:
03/14/12 00:24:07 (2 years ago)
Author:
kurtpayne
Message:

Updated test to more closely match real world usage. See http://core.trac.wordpress.org/ticket/19855#comment:12

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wp-testcase/test_includes_formatting.php

    r574 r575  
    634634 
    635635        // Text before/after is wrapped in <p> tags 
    636         $str = "Look at this code <pre>$code</pre> Isn't that cool?";        
    637         $this->assertEquals( '<p>Look at this code </p>' . "\n<pre>" . $code . "</pre>\n" . '<p> Isn\'t that cool?</p>', trim( wpautop( $str ) ) ); 
     636        $str = "Look at this code\n\n<pre>$code</pre>\n\nIsn't that cool?"; 
     637         
     638        // Expected text after wpautop 
     639        $expected = '<p>Look at this code</p>' . "\n<pre>" . $code . "</pre>\n" . '<p>Isn\'t that cool?</p>'; 
     640        $this->assertEquals( $expected, trim( wpautop( $str ) ) ); 
    638641    } 
    639642     
Note: See TracChangeset for help on using the changeset viewer.