Skip to content

Make SpoofedCollaborator implement or extend wrapped class #6

@akondas

Description

@akondas

This is problem, when collaborator is used not only in Subject or Collaborator, for example:

public function it_should_be_nice_spec(Client $client): void
{
    $this->doSomethingMore($client);

    $this->make($client)->shouldReturn('magic');
}

private function doSomethingMore(Client $client): void
{
}
  34     Parameter #1 $client of method                                                                
         spec\SomeSpec::doSomethingMore() expects                  
         Client,                                                            
         class@anonymous\/var/www/proget/vendor/proget-hq/phpstan-phpspec/src/NodeVisitor/Collab  
         oratorResolver.php(42) : eval()'d code0x7f3a250371b2 given.  

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