You are here

public function EmailTemplatesTest::testGotAnEmail in Auth0 Single Sign On 8.2

Test if we got an email template, test create if we didn't

Throws

\Exception

File

vendor/auth0/auth0-php/tests/API/Management/EmailTemplatesTest.php, line 126

Class

EmailTemplatesTest
Class EmailTemplatesTest

Namespace

Auth0\Tests\API\Management

Code

public function testGotAnEmail() {
  if (self::$mustCreate) {
    $from_email = 'test@' . self::$domain;
    self::$gotEmail = self::$api->emailTemplates
      ->create(self::EMAIL_TEMPLATE_NAME, $from_email);
    $this
      ->assertEquals($from_email, self::$gotEmail['from']);
  }
  $this
    ->assertEquals(self::EMAIL_TEMPLATE_NAME, self::$gotEmail['template']);
}