registerProvider() публичный Метод

Registers the specified provider optionally identified by the specified tag.
public registerProvider ( ScriptFUSION\Porter\Provider\Provider $provider, string | null $tag = null )
$provider ScriptFUSION\Porter\Provider\Provider Provider.
$tag string | null Optional. Provider tag.
Пример #1
0
 public function testApplyCacheAdvice()
 {
     $this->porter->registerProvider($provider = \Mockery::mock(implode(',', [Provider::class, CacheToggle::class]))->shouldReceive('fetch')->andReturn(new \EmptyIterator())->shouldReceive('disableCache')->once()->shouldReceive('enableCache')->once()->getMock());
     $this->porter->import($specification = new ImportSpecification(MockFactory::mockResource($provider)));
     $this->porter->import($specification->setCacheAdvice(CacheAdvice::SHOULD_CACHE()));
 }