I had the same problem and it was solved by passing full name of class that you want to mock.
With this in mind your mocking code will look like:
$this->questionMock = Mockery::mock('App\Question');
...
$this->app->instance('App\Question', $this->questionMock);
To anyone looking at this question in the future: Laravel now recommends ::class syntax in the framework.
$this->questionMock = Mockery::mock(Question::class);
$this->app->instance(Question::class, $this->questionMock);
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community