1
0
mirror of https://github.com/php/php-src.git synced 2026-03-25 16:52:18 +01:00
Files
archived-php-src/ext/spl/tests/SplFileInfo_setInfoClass_error.phpt
Gabriel Caruso 4aabfe911e Revert "Update versions for PHP 8.0.21"
This reverts commit 6eedacdf15.
2022-07-06 12:06:48 +02:00

17 lines
354 B
PHP

--TEST--
SplFileInfo::setInfoClass() throws exception for invalid class
--FILE--
<?php
$info = new SplFileInfo(__FILE__);
try {
$info->setInfoClass('stdClass');
} catch (TypeError $e) {
echo $e->getMessage(), "\n";
}
?>
--EXPECT--
SplFileInfo::setInfoClass(): Argument #1 ($class) must be a class name derived from SplFileInfo, stdClass given