Skip to content
This repository was archived by the owner on Feb 20, 2023. It is now read-only.
This repository was archived by the owner on Feb 20, 2023. It is now read-only.

Cloning paramaters in mocked methods/objects #47

Closed
@johnwards

Description

@johnwards

I've hit against an issue where I am expecting a paramater to be passed by reference in a mocked object and it isn't working. It seems that it is being cloned.

I created a Stack Overflow post on this as I wasn't sure if I was being silly.

http://stackoverflow.com/questions/5170747/pass-by-reference-in-a-callback-when-mocking-in-phpunit

Comment on the accepted answer suggested that feedback was needed on this cloning idea.

I would say that it is a bad idea based on this use case as its not expected. I'm not sure of the arguments for it so I can't really argue very hard.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions