Changeset 1739
- Timestamp:
- 07/27/08 23:42:48 (4 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
framework/trunk/src/main/php/net/stubbles/xml/xsl/stubXSLProcessor.php
r1737 r1739 58 58 public function __construct() 59 59 { 60 if (extension_loaded('xsl') == false) {60 if (extension_loaded('xsl') === false) { 61 61 throw new stubRuntimeException('Can not create ' . __CLASS__ . ', requires PHP-extension "xsl".'); 62 62 } … … 68 68 * creates the XSLTProcessor instance 69 69 */ 70 // @codeCoverageIgnoreStart71 70 protected function createXSLTProcessor() 72 71 { 73 72 $this->xsltProcessor = new XSLTProcessor(); 74 73 } 75 // @codeCoverageIgnoreEnd76 74 77 75 /** … … 144 142 { 145 143 $this->stylesheets[] = $stylesheet; 146 $this->xsltProcessor->importStylesheet($stylesheet); #144 $this->xsltProcessor->importStylesheet($stylesheet); 147 145 return $this; 148 146 } framework/trunk/src/test/php/net/stubbles/xml/xsl/stubXSLProcessorTestCase.php
r1737 r1739 95 95 96 96 /** 97 * test creation with applyStylesheet() 98 * 99 * @test 100 */ 101 public function creationWithApplyStylesheet() 102 { 103 $stylesheet = new DOMDocument(); 104 $xslProcessor = stubXSLProcessor::applyStylesheet($stylesheet); 105 $this->assertType('stubXSLProcessor', $xslProcessor); 106 $this->assertEquals(array($stylesheet), $xslProcessor->getStylesheets()); 107 } 108 109 /** 110 * test creation with applyStylesheetFromFile() 111 * 112 * @test 113 */ 114 public function creationWithApplyStylesheetFromFile() 115 { 116 $xslProcessor = stubXSLProcessor::applyStylesheetFromFile(TEST_SRC_PATH . '/resources/xsl/testfile.xsl'); 117 $this->assertType('stubXSLProcessor', $xslProcessor); 118 $this->assertEquals(1, count($xslProcessor->getStylesheets())); 119 } 120 121 /** 97 122 * onDocument() should returns its instance 98 123 *
