WordPress.org

Make WordPress Core

Changeset 560 in tests


Ignore:
Timestamp:
03/02/12 19:55:34 (2 years ago)
Author:
kurtpayne
Message:

Test for #16456 - Input is not a block element. Also renaming "test_long_text" and updating phpdoc comments.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wp-testcase/test_includes_formatting.php

    r558 r560  
    617617        $this->assertEquals($expected, wpautop($test_data)); 
    618618    } 
    619      
    620      
    621     function test_large_text() { 
     619 
     620    /** 
     621     * wpautop() Should not alter the contents of "<pre>" elements 
     622     * @link http://core.trac.wordpress.org/ticket/19855 
     623     * @return void 
     624     */  
     625    public function test_skip_pre_elements() { 
    622626        $this->knownWPBug( 19855 ); 
    623627        $str = '<pre>' . file_get_contents( realpath( dirname( __FILE__ ) . '/../wp-testdata/formatting/sizzle.js' ) ) . '</pre>'; 
     628        $this->assertEquals( "<p>$str</p>", trim( wpautop( $str ) ) ); 
     629    } 
     630     
     631    /** 
     632     * wpautop() Should not add <br/> to "<input>" elements 
     633     * @link http://core.trac.wordpress.org/ticket/16456 
     634     * @return void 
     635     */  
     636    public function test_skip_input_elements() { 
     637        $this->knownWPBug( 16456 ); 
     638        $str = 'Username: <input type="text" id="username" name="username" /><br />Password: <input type="password" id="password1" name="password1" />'; 
    624639        $this->assertEquals( "<p>$str</p>", trim( wpautop( $str ) ) ); 
    625640    } 
Note: See TracChangeset for help on using the changeset viewer.