You are here

protected function ContentHubStatusReportTest::setUp in Acquia Content Hub 8.2

Overrides EntityKernelTestBase::setUp

File

tests/src/Kernel/ContentHubStatusReportTest.php, line 50

Class

ContentHubStatusReportTest
Tests the Content Hub settings form.

Namespace

Drupal\Tests\acquia_contenthub\Kernel

Code

protected function setUp() {
  parent::setUp();
  $settings = $this
    ->prophesize(Settings::class);
  $settings
    ->getUuid()
    ->willReturn('3a89ff1b-8869-419d-b931-f2282aca3e88');
  $settings
    ->getName()
    ->willReturn('foo');
  $settings
    ->getUrl()
    ->willReturn('http://www.example.com');
  $settings
    ->getApiKey()
    ->willReturn('apikey');
  $settings
    ->getSecretKey()
    ->willReturn('apisecret');
  $this->client = $this
    ->prophesize(ContentHubClient::class);
  $clientFactory = $this
    ->prophesize(ClientFactory::class);
  $clientFactory
    ->getSettings()
    ->willReturn($settings
    ->reveal());
  $this->client
    ->getSettings()
    ->willReturn($settings
    ->reveal());
  $this->clientFactory = $clientFactory;
}