FAQ
Edit report at https://pear.php.net/bugs/bug.php?id=19468&edit=1

ID: 19468
Updated by: daniel.oconnor@gmail.com
Reported By: mich200 at hotmail dot fr
Summary: uncloneable class mysqli with mock
-Status: Open
+Status: Duplicate
Type: Bug
Package: PHPUnit
Operating System: ubuntu
Package Version: 1.3.2
PHP Version: 5.4.3
Roadmap Versions:
New Comment:

-Status: Open
+Status: Duplicate



Previous Comments:
------------------------------------------------------------------------

[2012-06-09 19:27:27] mich200

Description:
------------
when i try to mock the mysqli class, i've got a fatal error.

Fatal error: Trying to clone an uncloneable object of class mysqli

the problem is in PHPUnit/Framework/MockObject/Invocation/Static.php
file (cloneObject method)

i have fixed the bug "temporarily" adding "mysqli" in
$uncloneableClasses attribute list.

i supposed all mysli classes (like mysqli_result) have the same problem

Test script:
---------------
$class = new mysqli();
try {
echo 'try clone';
clone $class;
}
catch (Exception $e) {
echo 'exception';
}

------------------------------------------------------------------------

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppear-bugs @
categoriesphp
postedSep 2, '12 at 12:10p
activeSep 2, '12 at 12:10p
posts1
users1
websitepear.php.net

1 user in discussion

Daniel Oconnor: 1 post

People

Translate

site design / logo © 2022 Grokbase