|
Revision 336, 0.7 kB
(checked in by nperriault, 10 months ago)
|
Clever Svg:
- refs #40: more elements tests
- Removed depth management, as svg handle it natively
Warning: breaks BC from 0.5.
|
| Line | |
|---|
| 1 |
<?php |
|---|
| 2 |
require_once 'PHPUnit/Framework.php'; |
|---|
| 3 |
require_once dirname(__FILE__).'/../cleversvg.php'; |
|---|
| 4 |
require_once dirname(__FILE__).'/csBaseTestCase.class.php'; |
|---|
| 5 |
|
|---|
| 6 |
|
|---|
| 7 |
|
|---|
| 8 |
|
|---|
| 9 |
|
|---|
| 10 |
class csLineTest extends csBaseTestCase |
|---|
| 11 |
{ |
|---|
| 12 |
|
|---|
| 13 |
public function testSetters() |
|---|
| 14 |
{ |
|---|
| 15 |
$doc = new csDocument(320, 240, 'Blah'); |
|---|
| 16 |
$line = new csLine(); |
|---|
| 17 |
$line->setX1(1); |
|---|
| 18 |
$line->setY1(2); |
|---|
| 19 |
$line->setX2(3); |
|---|
| 20 |
$line->setY2(4); |
|---|
| 21 |
$doc->addElement($line); |
|---|
| 22 |
$this->assertAttrValueEquals($doc, '/svg:svg/svg:line/@x1', 1); |
|---|
| 23 |
$this->assertAttrValueEquals($doc, '/svg:svg/svg:line/@y1', 2); |
|---|
| 24 |
$this->assertAttrValueEquals($doc, '/svg:svg/svg:line/@x2', 3); |
|---|
| 25 |
$this->assertAttrValueEquals($doc, '/svg:svg/svg:line/@y2', 4); |
|---|
| 26 |
} |
|---|
| 27 |
|
|---|
| 28 |
} |
|---|
| 29 |
|
|---|