Closed (fixed)
Project:
Page Manager
Version:
8.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
23 Jul 2015 at 21:24 UTC
Updated:
16 Aug 2015 at 22:14 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
tim.plunkettI may be using this completely wrong, couldn't find too many examples to go on.
Comment #2
jibranWoW this looks awesome.
Comment #3
berdirprophesize can't handle partial mocks?
Comment #4
dawehnerThey don't want to support it by design, see https://github.com/phpspec/prophecy/issues/101.
In an ideal world phpunit would have used mockery.
Comment #5
fabianx commented#3 #4: Yeah, sadly not.
Mockery shines when using partial or even Mocks for classes that do not exist, e.g. interfaces that are not defined.
However Prophecy is really great in overwriting the behavior of a defined mock per test class and also the dynamic binding of allowing a setter to overwrite the expectation of a getter is really great.
http://everzet.com/post/72910908762/conceptual-difference-between-mocker... is an insightful post on that.
Comment #6
tim.plunkettRight. So the question here is, do we want to mix mocking libraries within a test (or project)?
Comment #7
dawehnerWithin a project I would say no problem at all. Within a test, mh, depends how much it improves readability.
Comment #8
berdirAnd this improves it a lot.
I'd say we should just commit it, want to continue working on #2528370: Simplify block caching and allow to cache the whole page, including access checks but kind of waiting for this to land as it will conflict a lot with the unit test changes that I will have to do there.
Comment #9
dawehnerToo bad that tim is on vacation.
Comment #11
tim.plunkettCommitted, should have done this before I left, sorry!
Comment #12
berdirWow, is that week already over? :)
Thanks, no problem, didn't have time anyway to work on it :)