WordPress.org

Make WordPress Core

Changeset 426 in tests


Ignore:
Timestamp:
08/23/11 15:38:22 (3 years ago)
Author:
nacin
Message:

Add nestable tags tests. see #WP6870.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wp-testcase/test_includes_formatting.php

    r417 r426  
    930930        $this->assertEquals("<b><i>abc</i></b>", balanceTags("<b><i>abc</b></i>", true)); 
    931931    } 
     932 
     933    function test_nestable_tags() { 
     934        $this->assertEquals( '<div><div>Test</div></div>', balanceTags( '<div><div>Test</div>', true ) ); 
     935        $this->assertEquals( '<q>Test<q>Test</q></q>', balanceTags( '<q>Test<q>Test</q>', true ) ); 
     936        // not nestable 
     937        $this->assertEquals( '<b>Test</b><b>Test</b>', balanceTags( '<b>Test<b>Test</b>', true ) ); 
     938    } 
    932939} 
    933940 
Note: See TracChangeset for help on using the changeset viewer.