summaryrefslogtreecommitdiff
path: root/ext/spl/tests/SplFileInfo_setFileClass_error.phpt
blob: 7443998013ce55e95e699791ab3c2892d720257c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
--TEST--
SplFileInfo::setFileClass() throws exception for invalid class
--FILE--
<?php

$info = new SplFileInfo(__FILE__);

try {
    $info->setFileClass('stdClass');
} catch (UnexpectedValueException $e) {
    echo $e->getMessage(), "\n";
}

?>
--EXPECT--
SplFileInfo::setFileClass() expects parameter 1 to be a class name derived from SplFileObject, 'stdClass' given