WordPress.org

Make WordPress Core

Changeset 661 in tests


Ignore:
Timestamp:
04/09/12 21:51:10 (3 years ago)
Author:
coffee2code
Message:

Add more comprehensive tests for balanceTags()

Location:
wp-testcase
Files:
1 added
1 edited

Legend:

Unmodified
Added
Removed
  • wp-testcase/test_includes_formatting.php

    r656 r661  
    10561056} 
    10571057 
    1058 class TestBalanceTags extends WPTestCase { 
    1059     function test_adds_missing_end_tags() { 
    1060         $this->assertEquals("<b><i>abc</i></b>", balanceTags("<b><i>abc</b>", true)); 
    1061     } 
    1062  
    1063     function test_fixes_simple_bad_nesting() { 
    1064         $this->assertEquals("<b><i>abc</i></b>", balanceTags("<b><i>abc</b></i>", true)); 
    1065     } 
    1066  
    1067     function test_nestable_tags() { 
    1068         $this->assertEquals( '<div><div>Test</div></div>', balanceTags( '<div><div>Test</div>', true ) ); 
    1069         $this->assertEquals( '<q>Test<q>Test</q></q>', balanceTags( '<q>Test<q>Test</q>', true ) ); 
    1070         // not nestable 
    1071         $this->assertEquals( '<b>Test</b><b>Test</b>', balanceTags( '<b>Test<b>Test</b>', true ) ); 
    1072     } 
    1073 } 
    1074  
    10751058class TestZeroise extends WPTestCase { 
    10761059    function test_pads_with_leading_zeroes() { 
Note: See TracChangeset for help on using the changeset viewer.