f90e19c3
Andrea Petta
plugin update
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
<?php
/**
* Test class for PHPRtfLite_Border
*/
class PHPRtfLite_BorderTest extends PHPUnit_Framework_TestCase
{
/**
* @var PHPRtfLite_Border
*/
private $_border;
/**
* Sets up the fixture, for example, opens a network connection.
* This method is called before a test is executed.
*/
protected function setUp()
{
$rtf = new PHPRtfLite;
$this->_border = new PHPRtfLite_Border($rtf);
}
/**
* tests create
*/
public function testCreateBorder()
{
$rtf = new PHPRtfLite;
$border = PHPRtfLite_Border::create($rtf, 1.5, '#ff0', PHPRtfLite_Border_Format::TYPE_SINGLE, 5);
$this->assertType('PHPRtfLite_Border_Format', $border->getBorderTop());
$this->assertType('PHPRtfLite_Border_Format', $border->getBorderBottom());
$this->assertType('PHPRtfLite_Border_Format', $border->getBorderRight());
$this->assertType('PHPRtfLite_Border_Format', $border->getBorderLeft());
}
/**
* tests setBorders
*/
public function testSetBorders()
{
$borderFormat = new PHPRtfLite_Border_Format(1.5, '#ff0', PHPRtfLite_Border_Format::TYPE_SINGLE);
$this->_border->setBorders($borderFormat);
$this->assertType('PHPRtfLite_Border_Format', $this->_border->getBorderTop());
$this->assertType('PHPRtfLite_Border_Format', $this->_border->getBorderBottom());
$this->assertType('PHPRtfLite_Border_Format', $this->_border->getBorderRight());
$this->assertType('PHPRtfLite_Border_Format', $this->_border->getBorderLeft());
}
}
|