$time =
$this->
prophesize('\Drupal\Component\Datetime\TimeInterface'
);
$time->
getCurrentTime()->
willReturn($this->currentTime
);
$this->logger =
$this->
prophesize('\Psr\Log\LoggerInterface'
);
$logger_factory =
new LoggerChannelFactory();
$logger_factory->
addLogger($this->logger->
reveal());
$this->responses =
new MockHandler();
$client =
new Client([ 'handler' => HandlerStack::
create($this->responses
),
]);
$this->repository =
new ProviderRepository( $client,
$config_factory,
$time->
reveal(),
$key_value_factory,
$logger_factory );
} /**
* Tests that a successful fetch stores the provider database in key-value.
*/