1
0
mirror of https://github.com/php/php-src.git synced 2026-03-26 17:22:15 +01:00
Files
archived-php-src/ext/spl/tests/SplFileInfo_setFileClass_error.phpt
Máté Kocsis 960318ed95 Change argument error message format
Closes GH-5211
2020-02-26 15:00:08 +01:00

17 lines
363 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