You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With Doctrine/Orm V2.6, so my test doesn't pass anymore, with return by reference in getEntityChangeSet Prophecy\Exception\Doubler\ReturnByReferenceException: Returning by reference not supported
Have you any suggestion to testing my class with Prophecy?
Thanks.
The text was updated successfully, but these errors were encountered:
That's not possible with Prophecy.
I really don't know the reasons of this behaviour but I suppose is due to "double" encapsulation and those kind of things.
If you would like to test a class that relies on third party code you should not use Prophecy (more in general you should not do unit tests) at all: do other kind of test (functional, e2e, integration, etc)
Hello,
I use Prophecy to testing my code. I have this code in my test class
$unitOfWork = $this->prophesize(UnitOfWork::class);
$unitOfWork->getEntityChangeSet(Argument::exact($account))->willReturn($changeSet)->shouldBeCalled();
With Doctrine/Orm V2.6, so my test doesn't pass anymore, with return by reference in getEntityChangeSet Prophecy\Exception\Doubler\ReturnByReferenceException: Returning by reference not supported
Have you any suggestion to testing my class with Prophecy?
Thanks.
The text was updated successfully, but these errors were encountered: