AspectMock
AspectMock copied to clipboard
How can i past a double to a class contructor?
the following doesnt' work
$ck = test::double(CacheKey::class, [ 'track' => null,])->make();
$cityConfigProvider = new CityConfigProvider($cityConfigBuilder, $ck); // failed for $ck is not an instance of CacheKey
$ck->verifyInvoked('track');
$value = $cityConfigProvider->get($cityId, 'wechat_app_Id');