You are here

protected function ContentHubDeleteClientConfirmFormTest::setUp in Acquia Content Hub 8.2

Overrides BrowserTestBase::setUp

File

tests/src/Functional/ContentHubDeleteClientConfirmFormTest.php, line 56

Class

ContentHubDeleteClientConfirmFormTest
Tests the Content Hub Delete Client confirmation form.

Namespace

Drupal\Tests\acquia_contenthub\Functional

Code

protected function setUp() {
  parent::setUp();
  $this->authorizedUser = $this
    ->drupalCreateUser([
    'administer acquia content hub',
  ]);
  $this->unauthorizedUser = $this
    ->drupalCreateUser();
  $this
    ->drupalLogin($this->authorizedUser);
  $settings = [
    'hostname' => MockDataProvider::VALID_HOSTNAME,
    'api_key' => MockDataProvider::VALID_API_KEY,
    'secret_key' => MockDataProvider::VALID_SECRET,
    'client_name' => MockDataProvider::VALID_CLIENT_NAME,
    'webhook' => 'http://invalid-url.com',
  ];

  // Successful attempt to register client, but webhook url is unreachable.
  $this
    ->drupalPostForm('/admin/config/services/acquia-contenthub', $settings, 'Register Site');
}