Skip to content

Commit

Permalink
Clone TestDoubleState object
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianbergmann committed Apr 9, 2024
1 parent 129461f commit 20c1475
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Framework/MockObject/Runtime/Api/DoubledCloneMethod.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ trait DoubledCloneMethod
{
public function __clone(): void
{
$this->__phpunit_state = clone $this->__phpunit_state;

$this->__phpunit_state()->cloneInvocationHandler();
}

Expand Down
2 changes: 2 additions & 0 deletions src/Framework/MockObject/Runtime/Api/ProxiedCloneMethod.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ trait ProxiedCloneMethod
{
public function __clone(): void
{
$this->__phpunit_state = clone $this->__phpunit_state;

$this->__phpunit_state()->cloneInvocationHandler();

parent::__clone();
Expand Down

0 comments on commit 20c1475

Please sign in to comment.