helly Tue Jul 1 15:59:50 2003 EDT
Added files:
/php-src/tests/classes factory_and_singleton_007.phpt
factory_and_singleton_008.phpt
Log:
Add tests for __clone visibility
Index: php-src/tests/classes/factory_and_singleton_007.phpt
+++ php-src/tests/classes/factory_and_singleton_007.phpt
--TEST--
ZE2 factory and singleton, test 7
--SKIPIF--
<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2
needed'); ?>
--FILE--
<?php
class test {
protected function __clone() {
}
}
$obj = new test;
$clone = $obj->__clone();
$obj = NULL;
echo "Done\n";
?>
--EXPECTF--
Fatal error: Call to protected __clone from context '' %sfactory_and_singleton_007.php
on line %d
Index: php-src/tests/classes/factory_and_singleton_008.phpt
+++ php-src/tests/classes/factory_and_singleton_008.phpt
--TEST--
ZE2 factory and singleton, test 8
--SKIPIF--
<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2
needed'); ?>
--FILE--
<?php
class test {
private function __clone() {
}
}
$obj = new test;
$clone = $obj->__clone();
$obj = NULL;
echo "Done\n";
?>
--EXPECTF--
Fatal error: Call to private __clone from context '' %sfactory_and_singleton_007.php
on line %d
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php