Show
Ignore:
Timestamp:
03/01/08 22:38:45 (4 years ago)
Author:
nperriault
Message:

refs #40 - base xml related test case utilities

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • cleversvg/trunk/tests/csDocumentTest.php

    r326 r334  
    1515    $doc = $this->generateTestDoc(); 
    1616    $doc->setDescription('Added description'); 
    17     $xml = $doc->toXML(); 
    18     $this->assertEquals(preg_match('#<desc>Added description</desc>#si', $xml), 1, $xml); 
     17    $this->assertTextNodeEquals($doc, '/svg:svg/svg:desc', 'Added description'); 
     18    $doc->setDescription('Changed description'); 
     19    $this->assertTextNodeEquals($doc, '/svg:svg/svg:desc', 'Changed description'); 
    1920  } 
    2021 
     
    2223  { 
    2324    $doc = $this->generateTestDoc(); 
     25    $doc->setTitle('Added title'); 
     26    $this->assertTextNodeEquals($doc, '/svg:svg/svg:title', 'Added title'); 
    2427    $doc->setTitle('Changed title'); 
    25     $xml = $doc->toXML(); 
    26     $this->assertEquals(preg_match('#<title>Changed title</title>#si', $xml), 1, $xml); 
     28    $this->assertTextNodeEquals($doc, '/svg:svg/svg:title', 'Changed title'); 
    2729  } 
    2830