WordPress.org

Make WordPress Core

Changeset 206 in tests


Ignore:
Timestamp:
05/01/08 03:14:55 (7 years ago)
Author:
tellyworth
Message:

add wptestattributefiltering

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wp-testcase/test_post_output.php

    r205 r206  
    278278 
    279279 
     280 
     281class WPTestAttributeFiltering extends _WPTestSinglePost { 
     282    function setUp() { 
     283 
     284        // http://bpr3.org/?p=87 
     285        // the title attribute should make it through unfiltered 
     286        $this->post_content =<<<EOF 
     287<span class="Z3988" title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.aulast=Mariat&rft.aufirst=Denis&rft. au=Denis+Mariat&rft.au=Sead+Taourit&rft.au=G%C3%A9rard+Gu%C3%A9rin& rft.title=Genetics+Selection+Evolution&rft.atitle=&rft.date=2003&rft. volume=35&rft.issue=1&rft.spage=119&rft.epage=133&rft.genre=article& rft.id=info:DOI/10.1051%2Fgse%3A2002039"></span>Mariat, D., Taourit, S., Guérin, G. (2003). . <span style="font-style: italic;">Genetics Selection Evolution, 35</span>(1), 119-133. DOI: <a rev="review" href= "http://dx.doi.org/10.1051/gse:2002039">10.1051/gse:2002039</a> 
     288 
     289EOF; 
     290 
     291        parent::setUp(); 
     292    } 
     293 
     294    function test_the_content() { 
     295        $this->_do_post(); 
     296        $expected =<<<EOF 
     297<p><span class="Z3988" title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.aulast=Mariat&rft.aufirst=Denis&rft. au=Denis+Mariat&rft.au=Sead+Taourit&rft.au=G%C3%A9rard+Gu%C3%A9rin& rft.title=Genetics+Selection+Evolution&rft.atitle=&rft.date=2003&rft. volume=35&rft.issue=1&rft.spage=119&rft.epage=133&rft.genre=article& rft.id=info:DOI/10.1051%2Fgse%3A2002039"></span>Mariat, D., Taourit, S., Guérin, G. (2003). . <span style="font-style: italic;">Genetics Selection Evolution, 35</span>(1), 119-133. DOI: <a rev="review" href= "http://dx.doi.org/10.1051/gse:2002039">10.1051/gse:2002039</a></p> 
     298 
     299EOF; 
     300 
     301        $this->assertEquals(strip_ws($expected), strip_ws(get_echo('the_content'))); 
     302    } 
     303} 
     304 
    280305?> 
Note: See TracChangeset for help on using the changeset viewer.