You are here

protected function DeveloperAppApiKeysPermissionTest::tearDown in Apigee Edge 8

Overrides BrowserTestBase::tearDown

File

tests/src/Functional/DeveloperAppApiKeysPermissionTest.php, line 131

Class

DeveloperAppApiKeysPermissionTest
Tests Api Keys permissions for developer_app.

Namespace

Drupal\Tests\apigee_edge\Functional

Code

protected function tearDown() {
  $this->stack
    ->reset();
  try {
    if ($this->account) {
      $developer = \Drupal::entityTypeManager()
        ->getStorage('developer')
        ->create([
        'email' => $this->account
          ->getEmail(),
      ]);
      $developer
        ->delete();
    }
    if ($this->developerApp) {
      $this->developerApp
        ->delete();
    }
    if ($this->apiProduct) {
      $this->apiProduct
        ->delete();
    }
  } catch (\Exception $exception) {
    $this
      ->logException($exception);
  }
  parent::tearDown();
}