AspectMock icon indicating copy to clipboard operation
AspectMock copied to clipboard

How can i past a double to a class contructor?

Open videni opened this issue 4 years ago • 0 comments

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');

videni avatar Apr 27 '20 10:04 videni