1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 16:22:37 +01:00
Files
archived-php-src/ext/spl/tests/SplFileInfo_setFileClass_error.phpt
2020-07-10 21:05:28 +02:00

17 lines
361 B
PHP

--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_name) must be a class name derived from SplFileObject, stdClass given