1<?php 2 3class TestBorderLeft extends GenericTest { 4 function testBorderLeft1() { 5 $tree = $this->runPipeline(file_get_contents('test.border-left.1.html')); 6 7 $element =& $tree->get_element_by_id('div1'); 8 $border =& $element->getCSSProperty(CSS_BORDER); 9 $top =& $border->get_top(); 10 $this->assertEqual($top->get_style(), BS_NONE); 11 $bottom =& $border->get_bottom(); 12 $this->assertEqual($bottom->get_style(), BS_NONE); 13 $right =& $border->get_right(); 14 $this->assertEqual($right->get_style(), BS_NONE); 15 $left =& $border->get_left(); 16 $this->assertEqual($left->get_style(), BS_SOLID); 17 $width =& $left->get_width(); 18 $this->assertEqual($width, px2pt(1)); 19 $color =& $left->get_color(); 20 $this->assertEqual($color->r, 0); 21 $this->assertEqual($color->g, 0); 22 $this->assertEqual($color->b, 0); 23 24 $element =& $tree->get_element_by_id('div2'); 25 $border =& $element->getCSSProperty(CSS_BORDER); 26 $top =& $border->get_top(); 27 $this->assertEqual($top->get_style(), BS_NONE); 28 $bottom =& $border->get_bottom(); 29 $this->assertEqual($bottom->get_style(), BS_NONE); 30 $right =& $border->get_right(); 31 $this->assertEqual($right->get_style(), BS_NONE); 32 $left =& $border->get_left(); 33 $this->assertEqual($left->get_style(), BS_SOLID); 34 $width =& $left->get_width(); 35 $this->assertEqual($width, px2pt(1)); 36 $color =& $left->get_color(); 37 $this->assertEqual($color->r, 0); 38 $this->assertEqual($color->g, 0); 39 $this->assertEqual($color->b, 0); 40 } 41} 42 43?>