Support the ongoing development of Laravel.io →
posted 10 years ago
IOC Testing
Last updated 2 years 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 2 years 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.