But now if I try with the newer tests I get an UnexpectedValueException: The Response content must be a string or object implementing __toString(), "boolean" given. back from phpunit.
I can't see any way around it in the docs or in the framework code - there doesn't seem to be a way of testing for file downloads without running them through Dusk - or am I missing something?
@SaeedPrez yeah - I'm trying to avoid relying on browserkit as it feels like it's 'deprecated' (certainly doesn't get any mention in the docs outside of the upgrade guide).
Just tried writing the same thing in Dusk and discovered there doesn't seem to be any built-in way of checking file downloads with it either.
Super....
At this rate I'm going to end up doing a file_get_contents() and testing against that :-/
@SaeedPrez yeah - I might prod him on the GitHub page for the TDD course. I feel a bit guilty randomly prodding folk on twitter sometimes - I imagine it can be a bit over-loaded if you're well-known.
The migration to 5.4 went fine for me until the testing stuff - I've been at this for days now and I still feel like I'm 'doing it wrong'. I'm going to end up with lots of duplicated tests just because doing the 'interacting with the app' parts in dusk is so slow to run so I have plain http post/get + assertions covering the much the same things.
@SaeedPrez dusk is fine (if slow) for a lot of stuff. If my apps were more JS-heavy I think I'd be over the moon with it. This app that I decided to migrate to 5.4 has zero JS in it - so all I really get from Dusk is a 10x slowdown :-/
The documentation looks awesome, what Dusk can do.. but for simple uses, I can see the benefits of BrowserKit, especially if there is 10x speed difference..