You are here

protected function DeveloperAppCredentialEventTest::setUp in Apigee Edge 8

Overrides ApigeeEdgeFunctionalTestBase::setUp

File

tests/src/Functional/DeveloperAppCredentialEventTest.php, line 70

Class

DeveloperAppCredentialEventTest
Developer app keys, credential event test.

Namespace

Drupal\Tests\apigee_edge\Functional

Code

protected function setUp() {
  parent::setUp();
  $this
    ->installExtraModules([
    'apigee_edge_test_app_keys',
  ]);
  $this->account = $this
    ->createAccount();
  $this->developer = Developer::load($this->account
    ->getEmail());
  $this->developerApp = DeveloperApp::create([
    'name' => $this
      ->randomMachineName(),
    'status' => App::STATUS_APPROVED,
    'developerId' => $this->developer
      ->getDeveloperId(),
  ]);
  $this->developerApp
    ->setOwner($this->account);
  $this->developerApp
    ->save();
  $this->apiProduct = ApiProduct::create([
    'name' => $this
      ->randomMachineName(),
    'displayName' => $this
      ->randomMachineName(),
    'approvalType' => ApiProduct::APPROVAL_TYPE_AUTO,
  ]);
  $this->apiProduct
    ->save();
}