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

Partial mock of trait can not invoked "parent" magic method. #127

Description

@jmalloc
trait T
{
    public function __call($name, array $arguments)
    {
        return '<called>';
    }
}

$handle = Phony::partialMock(T::class)->mock();
echo $handle->foo();

Output:

Warning: call_user_func_array() expects parameter 1 to be a valid callback, cannot access parent:: when current class scope has no parent in ...src/Mock/Factory/MockFactory.php(142) : eval()'d code on line 57

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions