Skip to content

Support for multiple calls to the same function #6

Closed
@rjmackay

Description

@rjmackay

There doesn't seem to be able simple way to set up expectations for multiple function calls.

I've ended up doing this as a workaround, but its ugly:

$mockFetchBody = PHPMockery::mock("Namespace", "imap_fetchbody");
$mockFetchBody
            ->with('someparams')
            ->andReturn('response');
$mockFetchBody
            ->getMock()
                ->shouldReceive(\phpmock\integration\MockDelegateFunctionBuilder::METHOD)
            ->with('nextparams')
            ->andReturn('response2');

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions