I'm working on an existing Laravel app and trying to start building out a test suite for it. I'm using the Mockery library to mock the dependencies of the class I'm testing but I've hit a roadblock I can't seem to get around.
$leadRepositoryInterface = m::mock('CRM\Storage\Lead\LeadRepositoryInterface');
$response = m::mock('ColorJar\ApiResponse\Response');
$object = new LeadsController($leadRepositoryInterface, $response);
I get an error when I run the preceding code because the parent class of LeadsController checks Input::all()[__currentUser] and crashes because Input::all() returns nothing.
I need to set the Laravel Input facade variable(I'm sure I'm misusing terminology there, sorry) to any user in my system but I don't see anywhere in the Mockery docs on how to set a property of a mocked object, I only see how to set expectations and return values. How would I do this? Will Laravel allow me to set the return of Input::all()?