You are here

protected function DeveloperAppFieldTest::setUp in Apigee Edge 8

Overrides ApigeeEdgeFunctionalTestBase::setUp

File

tests/src/Functional/DeveloperAppFieldTest.php, line 76

Class

DeveloperAppFieldTest
Fieldable developer app test.

Namespace

Drupal\Tests\apigee_edge\Functional

Code

protected function setUp() {
  parent::setUp();
  $this
    ->drupalPlaceBlock('system_breadcrumb_block');
  $this->account = $this
    ->createAccount([
    'administer apigee edge',
    'administer developer_app',
    'administer display modes',
    'administer developer_app fields',
    'administer developer_app form display',
    'administer developer_app display',
  ]);
  $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
    ->drupalLogin($this->account);
}