Skip to content

Support namespace style PHPUnit MockObject Stub - #307

Merged
kenjis merged 1 commit into
kenjis:masterfrom
ytetsuro:patch-2
Oct 20, 2019
Merged

Support namespace style PHPUnit MockObject Stub#307
kenjis merged 1 commit into
kenjis:masterfrom
ytetsuro:patch-2

Conversation

@ytetsuro

@ytetsuro ytetsuro commented Aug 19, 2019

Copy link
Copy Markdown
Contributor

I encountered the following error.

TypeError: Return value of Mock_Hoge_fetcher_7b0f1a88::fetch() must be an instance of Hoge_response_object, instance of PHPUnit\Framework\MockObject\Stub\Exception returned

This error occurs because phpunit-mock-objects is renewed.

Relation links 👇.

Test:

@ytetsuro

Copy link
Copy Markdown
Contributor Author

Is the following code better?

if (! class_exists('PHPUnit_Framework_MockObject_Stub'))
{
    class_alias('PHPUnit\Framework\MockObject\Stub', 'PHPUnit_Framework_MockObject_Stub');
}

@coveralls

Copy link
Copy Markdown

Coverage Status

Coverage remained the same at 56.044% when pulling 2ce1c13 on ytetsuro:patch-2 into 14960d3 on kenjis:master.

@kenjis
kenjis merged commit c97a1d1 into kenjis:master Oct 20, 2019
@kenjis kenjis added bug and removed enhancement labels Oct 20, 2019
@kenjis kenjis changed the title Support namespace style PHPUnit MockObject Support namespace style PHPUnit MockObject Stub Oct 20, 2019
kenjis added a commit that referenced this pull request Oct 20, 2019
Support namespace style PHPUnit MockObject
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants