You are here

public function EmailTest::testEmailValidator in Apigee Edge 8

Tests developer email already exists in Apigee Edge.

File

tests/src/Functional/EmailTest.php, line 69

Class

EmailTest
Developer email already exists in Apigee Edge related tests.

Namespace

Drupal\Tests\apigee_edge\Functional

Code

public function testEmailValidator() {
  $name = strtolower($this
    ->randomMachineName());
  $this->developer = Developer::create([
    'email' => $name . '@example.com',
    'userName' => $name,
    'firstName' => $this
      ->getRandomGenerator()
      ->word(8),
    'lastName' => $this
      ->getRandomGenerator()
      ->word(8),
  ]);

  // Stack developer responses for "created" and "set active".
  $this
    ->queueDeveloperResponseFromDeveloper($this->developer, 201);
  $this->stack
    ->queueMockResponse('no_content');
  $this->developer
    ->save();
  $this
    ->addOrganizationMatchedResponse();
  $this
    ->editUserWithAlreadyExistingEmailTest();
  $this
    ->registerWithAlreadyExistingEmail();
}