~gt/sahana-agasti/relief-experiments

« back to all changes in this revision

Viewing changes to 3rd/htmlpurifier/tests/HTMLPurifier/AttrDef/CSS/FontFamilyTest.php

  • Committer: turtle
  • Date: 2009-11-10 23:51:44 UTC
  • Revision ID: turtle@turtle-laptop-20091110235144-lvhvgwfm053jvq5q
first relief codebase

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?php
 
2
 
 
3
require_once 'HTMLPurifier/AttrDefHarness.php';
 
4
require_once 'HTMLPurifier/AttrDef/CSS/FontFamily.php';
 
5
 
 
6
class HTMLPurifier_AttrDef_CSS_FontFamilyTest extends HTMLPurifier_AttrDefHarness
 
7
{
 
8
    
 
9
    function test() {
 
10
        
 
11
        $this->def = new HTMLPurifier_AttrDef_CSS_FontFamily();
 
12
        
 
13
        $this->assertDef('Gill, Helvetica, sans-serif');
 
14
        $this->assertDef('\'Times New Roman\', serif');
 
15
        $this->assertDef('"Times New Roman"', "'Times New Roman'");
 
16
        $this->assertDef('01234');
 
17
        $this->assertDef(',', false);
 
18
        $this->assertDef('Times New Roman, serif', '\'Times New Roman\', serif');
 
19
        $this->assertDef($d = "'John\\'s Font'");
 
20
        $this->assertDef("John's Font", $d);
 
21
        $this->assertDef($d = "'\xE5\xAE\x8B\xE4\xBD\x93'");
 
22
        $this->assertDef("\xE5\xAE\x8B\xE4\xBD\x93", $d);
 
23
        
 
24
    }
 
25
    
 
26
}
 
27