Skip to content

Error with InstanceProxy and method with arguments passed by reference #39

Description

@tampe125

Let's say you have the following class:

class Foo
{
    public function bar($first, $second, &$third)
    {
         echo 'Hello, world!';
    }
}

You are expected to create a mock in this way:

$mock = new Foo();
$mock->($first, $second, $third);

However, if you do that, you'll get a PHP Warning, since the $third argument is not passed by reference.
I'll try to found a workaround for this, if it's possible I'll submit a pull request.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions