mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
16 lines
356 B
PHP
16 lines
356 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) must be a class name derived from SplFileObject, stdClass given
|