1<?php
2
3class TestBorderBottom extends GenericTest {
4  function testBorderBottom1() {
5    $tree = $this->runPipeline(file_get_contents('test.border-bottom.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    $left =& $border->get_left();
12    $this->assertEqual($left->get_style(), BS_NONE);
13    $right =& $border->get_right();
14    $this->assertEqual($right->get_style(), BS_NONE);
15    $bottom =& $border->get_bottom();
16    $this->assertEqual($bottom->get_style(), BS_SOLID);
17    $width =& $bottom->get_width();
18    $this->assertEqual($width, px2pt(1));
19    $color =& $bottom->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    $left =& $border->get_left();
29    $this->assertEqual($left->get_style(), BS_NONE);
30    $right =& $border->get_right();
31    $this->assertEqual($right->get_style(), BS_NONE);
32    $bottom =& $border->get_bottom();
33    $this->assertEqual($bottom->get_style(), BS_SOLID);
34    $width =& $bottom->get_width();
35    $this->assertEqual($width, px2pt(1));
36    $color =& $bottom->get_color();
37    $this->assertEqual($color->r, 0);
38    $this->assertEqual($color->g, 0);
39    $this->assertEqual($color->b, 0);
40  }
41}
42
43?>