You are here

protected function QueryTest::setUp in Apigee Edge 8

Overrides ApigeeEdgeFunctionalTestBase::setUp

File

tests/src/Functional/QueryTest.php, line 91

Class

QueryTest
Developer and developer app entity query test.

Namespace

Drupal\Tests\apigee_edge\Functional

Code

protected function setUp() {
  parent::setUp();
  $this->developerStorage = $this->container
    ->get('entity_type.manager')
    ->getStorage('developer');
  $this->developerAppStorage = $this->container
    ->get('entity_type.manager')
    ->getStorage('developer_app');
  $this->prefix = $this
    ->randomMachineName();

  // Create developers.
  foreach ($this->developerData as $data) {
    $data['email'] = "{$this->prefix}.{$data['email']}";
    $developer = Developer::create($data);
    $developer
      ->save();
    $this->edgeDevelopers[$data['email']] = $developer;
  }
}