summaryrefslogtreecommitdiff
path: root/ext/xsl/tests/xsltprocessor_importStylesheet-invalidparam.phpt
blob: 3849f69428aff37f9576b93a5edb4a2251e523ec (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
--TEST--
XSLTProcessor::importStylesheet() - Test with invalid stylesheet
--SKIPIF--
<?php
if (!extension_loaded('xsl')) {
    exit('Skip - XSL extension not loaded');
}
?>
--FILE--
<?php

$xslt = new XSLTProcessor();
$dummy = new stdClass();
try {
    var_dump($xslt->importStylesheet($dummy));
} catch (ValueError $e) {
    echo $e->getMessage(), "\n";
}

?>
--EXPECT--
XSLTProcessor::importStylesheet(): Argument #1 ($stylesheet) must be a valid XML node