Show
Ignore:
Timestamp:
03/02/08 15:12:12 (4 years ago)
Author:
nperriault
Message:

Clever Svg:

  • refs #40: more tests
  • added csDocument::getElementById() and csDocument::dropElementById() methods
  • fixed csDocument::swapDepths() bug

Warning: breaks BC from 0.5.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • cleversvg/trunk/tests/csBaseTestCase.class.php

    r334 r335  
    4848    { 
    4949      throw new PHPUnit_Framework_ExpectationFailedException( 
    50         sprintf('XPath query "%s" does not match value "%s". Source: %s', 
    51                 $xpath_query, $value, "\n".$doc->toXML())); 
     50        sprintf('XPath query "%s" does not match value "%s", but "%s". Source: %s', 
     51                $xpath_query, $value, $attr_value, "\n".$doc->toXML())); 
    5252    } 
    5353    return true; 
     54  } 
     55 
     56  protected function assertNodeExists($doc, $xpath_query) 
     57  { 
     58    $result = $this->documentXpath($doc, $xpath_query); 
     59    return !is_null($result->item(0)); 
     60  } 
     61 
     62  protected function assertNodeDoesNotExist($doc, $xpath_query) 
     63  { 
     64    return !$this->assertNodeExists($doc, $xpath_query); 
    5465  } 
    5566