Changeset 193

Show
Ignore:
Timestamp:
02/01/07 20:50:08 (2 years ago)
Author:
mikey
Message:

added test for net.stubbles.xml.xsl.util.stubXSLImageDimensions

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/src/main/php/net/stubbles/xml/xsl/util/stubXSLImageDimensions.php

    r191 r193  
    6969            throw new stubXSLCallbackException('Image ' . $imageFileName . ' seems not to be an image, can not retrieve dimension data.'); 
    7070        } 
    71         #$this->xmlStreamWriter->clear(); 
    72         $this->xmlStreamWriter->writeStartElement('dimensions'); 
     71         
     72        $this->xmlStreamWriter->writeStartElement('image'); 
    7373        $this->xmlStreamWriter->writeElement('width', array(), $image[0]); 
    7474        $this->xmlStreamWriter->writeElement('height', array(), $image[1]); 
    75         $this->xmlStreamWriter->writeElement('type', array(), $image[2]); 
     75        $this->xmlStreamWriter->writeElement('type', array(), $this->getType($image[2])); 
    7676        $this->xmlStreamWriter->writeElement('mime', array(), $image['mime']); 
    7777        $this->xmlStreamWriter->writeEndElement(); 
    78         return $this->xmlStreamWriter->asDom(); 
     78        $doc = $this->xmlStreamWriter->asDom(); 
     79        $this->xmlStreamWriter->clear(); 
     80        return $doc; 
    7981    } 
    8082     
  • trunk/src/test/php/net/stubbles/xml/XMLTestSuite.php

    r180 r193  
    3434        $this->addTestFile($dir . '/xsl/stubXSLCallbackTestCase.php'); 
    3535        $this->addTestFile($dir . '/xsl/stubXSLProcessorTestCase.php'); 
     36        $this->addTestFile($dir . '/xsl/util/stubXSLImageDimensionsTestCase.php'); 
    3637    } 
    3738}