issue with a collaborator

17 views
Skip to first unread message

Adrian Mihai

unread,
May 7, 2014, 3:29:24 AM5/7/14
to phpsp...@googlegroups.com
I've been using phpspec for a month or so now, and I've just ran into a bad issue with a call not being made. Basically I'm trying to check if a call is being made on a collaborator, and it tells me that it's not. https://gist.github.com/anonymous/cdf2b445680206db2e8d

Is there anything visibly wrong with either the spec or the code?

md

unread,
May 7, 2014, 5:29:59 AM5/7/14
to phpsp...@googlegroups.com
Use the same variable name (as opposed to $filter, $filter_factory) for the filter factory. PhpSpec uses reflection to treat them as the same double.

Marcello

Adrian Mihai

unread,
May 7, 2014, 5:49:09 AM5/7/14
to phpsp...@googlegroups.com
thank you Marcello,

I suspected that it was actually hitting "another" reflected collaborator, but I had no way of knowing about this behaviour besides studying the source code.

Should we document it somewhere?

Adrian
Reply all
Reply to author
Forward
0 new messages