1--TEST--
2SplFileInfo::setInfoClass() expects SplFileInfo or child class
3--FILE--
4<?php
5
6class MyInfoObject extends SplFileInfo {}
7
8$info = new SplFileInfo(__FILE__);
9
10$info->setInfoClass('MyInfoObject');
11echo get_class($info->getFileInfo()), "\n";
12echo get_class($info->getPathInfo()), "\n";
13
14$info->setInfoClass('SplFileInfo');
15echo get_class($info->getFileInfo()), "\n";
16echo get_class($info->getPathInfo()), "\n";
17
18?>
19--EXPECT--
20MyInfoObject
21MyInfoObject
22SplFileInfo
23SplFileInfo
24