You are here

public function DeveloperAppUITest::testNotificationsWhenAccountIsInactiveOnEdge in Apigee Edge 8

Tests the case when an account just got disabled on the edge UI.

File

tests/src/Functional/DeveloperAppUITest.php, line 452

Class

DeveloperAppUITest
Developer app UI tests.

Namespace

Drupal\Tests\apigee_edge\Functional

Code

public function testNotificationsWhenAccountIsInactiveOnEdge() {

  /** @var \Drupal\apigee_edge\SDKConnectorInterface $connector */
  $connector = $this->container
    ->get('apigee_edge.sdk_connector');
  $controller = new DeveloperController($connector
    ->getOrganization(), $connector
    ->getClient());
  $controller
    ->setStatus($this->account
    ->getEmail(), Developer::STATUS_INACTIVE);
  $this
    ->drupalGet("/user/{$this->account->id()}/apps");
  $this
    ->assertSession()
    ->pageTextContains('Your developer account has inactive status so you will not be able to use your credentials until your account gets activated. Please contact support for further assistance.');
  $this
    ->drupalLogin($this->rootUser);
  $this
    ->drupalGet("/user/{$this->account->id()}/apps");
  $this
    ->assertSession()
    ->pageTextContains("The developer account of {$this->account->getDisplayName()} has inactive status so this user has invalid credentials until the account gets activated.");
}