root/cleversvg/trunk/tests/csLinkTest.php

Revision 336, 0.6 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  * csLink PHPUnit tests
8  *
9  */
10 class csLinkTest extends csBaseTestCase
11 {
12
13   public function testSetters()
14   {
15     $doc = new csDocument(320, 240, 'Blah');
16     $line = new csLink();
17     $line->setHref('http://www.toto.com/');
18     $line->setTarget('MyTarget');
19     $doc->addElement($line);
20     $this->assertAttrValueEquals($doc, '/svg:svg/svg:a/@xlink:href', 'http://www.toto.com/');
21     $this->assertAttrValueEquals($doc, '/svg:svg/svg:a/@target', 'MyTarget');
22   }
23
24 }
25
Note: See TracBrowser for help on using the browser.