Make WordPress Core

Changeset 273 in tests


Ignore:
Timestamp:
11/30/2009 07:39:43 AM (14 years ago)
Author:
nbachiyski
Message:

Add test cases for clwan_url() with unicode

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wp-testcase/test_includes_formatting.php

    r271 r273  
    334334    function test_bracketed_quotes_3810() {
    335335        $this->assertEquals('A dog (“Hubertus”) was sent out.', wptexturize('A dog ("Hubertus") was sent out.'));
    336     }   
     336    }
    337337   
    338338    function test_quotes() {
     
    360360        $this->assertEquals('Class of ’99', wptexturize("Class of '99"));
    361361        $this->assertEquals('‘Class of ’99’', wptexturize("'Class of '99'"));
    362     }   
     362    }
    363363}
    364364
    365365class TestCleanUrl extends WPTestCase {
    366366    function test_spaces() {
    367         $this->assertEquals('http://example.com/Mr WordPress', clean_url('http://example.com/Mr WordPress'));
     367        $this->assertEquals('http://example.com/MrWordPress', clean_url('http://example.com/Mr WordPress'));
    368368        $this->assertEquals('http://example.com/Mr%20WordPress', clean_url('http://example.com/Mr%20WordPress'));
    369369    }
     
    396396        $this->assertEquals('http://example.com/'quoted'', clean_url('http://example.com/\'quoted\''));
    397397        $this->assertEquals('http://example.com/\'quoted\'', clean_url('http://example.com/\'quoted\'',null,'notdisplay'));
     398    }
     399   
     400    function test_non_ascii() {
     401        $this->assertEquals( 'http://example.org/баба', clean_url( 'http://example.org/баба' ) );
     402        $this->assertEquals( 'http://баба.org/баба', clean_url( 'http://баба.org/баба' ) );
     403        $this->assertEquals( 'http://müller.com/', clean_url( 'http://müller.com/' ) );
    398404    }
    399405}
Note: See TracChangeset for help on using the changeset viewer.