Changeset 394

Show
Ignore:
Timestamp:
03/18/07 12:48:02 (2 years ago)
Author:
mikey
Message:

added protection against fatal error if xsl-extension not available

Files:

Legend:

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

    r347 r394  
    5454    public function __construct() 
    5555    { 
     56        if (extension_loaded('xsl') == false) { 
     57            throw new stubException('Can not create ' . __CLASS__ . ', requires PHP-extension "xsl".'); 
     58        } 
     59         
    5660        $this->createXSLTProcessor(); 
    5761    } 
  • trunk/src/test/php/net/stubbles/xml/xsl/stubXSLProcessorTestCase.php

    r347 r394  
    6060     */ 
    6161    protected $document; 
     62     
     63    /** 
     64     * skip the test if xsl not available 
     65     */ 
     66    public function skip() 
     67    { 
     68        $this->skipUnless(extension_loaded('xsl'), 'stubXSLProcessor requires PHP-extension "xsl".'); 
     69    } 
    6270     
    6371    /**