Support the ongoing development of Laravel.io →
posted 9 years ago
IOC Testing
Last updated 1 year ago.
0

I've resolved this, apparently the backslash before namespaces were what was causing it, eg before I had:

$this->mockProvider = Mockery::mock('\Depotwarehouse\OAuth2\Client\Provider\BattleNet');
$this->app->instance('\Depotwarehouse\OAuth2\Client\Provider\BattleNet', $this->mockProvider);

where what I needed to have was:

$this->mockProvider = Mockery::mock('Depotwarehouse\OAuth2\Client\Provider\BattleNet');
$this->app->instance('Depotwarehouse\OAuth2\Client\Provider\BattleNet', $this->mockProvider);

Lesson learned!

Last updated 1 year ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

tpavlek tpavlek Joined 12 Sep 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.