diff options
Diffstat (limited to 'ext/phar/tests/phar_oo_006.phpt')
-rw-r--r-- | ext/phar/tests/phar_oo_006.phpt | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/ext/phar/tests/phar_oo_006.phpt b/ext/phar/tests/phar_oo_006.phpt index f595c2e412..c050859b86 100644 --- a/ext/phar/tests/phar_oo_006.phpt +++ b/ext/phar/tests/phar_oo_006.phpt @@ -11,21 +11,21 @@ require_once 'files/phar_oo_test.inc'; class MyFile extends SplFileObject { - function __construct($what) - { - echo __METHOD__ . "($what)\n"; - parent::__construct($what); - } + function __construct($what) + { + echo __METHOD__ . "($what)\n"; + parent::__construct($what); + } } $phar = new Phar($fname); try { - $phar->setFileClass('SplFileInfo'); + $phar->setFileClass('SplFileInfo'); } -catch (UnexpectedValueException $e) +catch (TypeError $e) { - echo $e->getMessage() . "\n"; + echo $e->getMessage() . "\n"; } $phar->setInfoClass('MyFile'); @@ -34,18 +34,16 @@ echo $phar['b/c.php']->getFilename() . "\n"; echo $phar['b.php']->getFilename() . "\n"; ?> -===DONE=== --CLEAN-- <?php unlink(__DIR__ . '/files/phar_oo_006.phar.php'); __halt_compiler(); ?> --EXPECTF-- -SplFileInfo::setFileClass() expects parameter 1 to be a class name derived from SplFileObject, 'SplFileInfo' given +SplFileInfo::setFileClass(): Argument #1 ($class_name) must be a class name derived from SplFileObject, 'SplFileInfo' given MyFile::__construct(phar://%s/a.php) a.php MyFile::__construct(phar://%s/b/c.php) c.php MyFile::__construct(phar://%s/b.php) b.php -===DONE=== |