summaryrefslogtreecommitdiff
path: root/ext/spl/tests/SplFileInfo_setFileClass_error.phpt
blob: 4ace511e26b0ee276e576e1838b21e835f22260e (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 (TypeError $e) {
    echo $e->getMessage(), "\n";
}

?>
--EXPECT--
SplFileInfo::setFileClass(): Argument #1 ($class) must be a class name derived from SplFileObject, stdClass given