1
0
mirror of https://github.com/php/php-src.git synced 2026-03-27 17:52:16 +01:00

The Phar class extends RecursiveDirectoryIterator, which has changed the way it ensures its ctor is called

This commit is contained in:
Hannes Magnusson
2011-08-29 14:17:41 +00:00
parent 934aba9f4f
commit fac70ca0f4

View File

@@ -30,14 +30,14 @@ try
$phar = new MyPhar();
var_dump($phar->getVersion());
}
catch (BadMethodCallException $e)
catch (LogicException $e)
{
var_dump($e->getMessage());
}
try {
$phar = new Phar('test.phar');
$phar->__construct('oops');
} catch (BadMethodCallException $e)
} catch (LogicException $e)
{
var_dump($e->getMessage());
}
@@ -52,6 +52,6 @@ __halt_compiler();
--EXPECT--
string(5) "1.0.0"
int(5)
string(50) "Cannot call method on an uninitialized Phar object"
string(103) "In the constructor of MyPhar, parent::__construct() must be called and its exceptions cannot be cleared"
string(29) "Cannot call constructor twice"
===DONE===