You are here

protected function EmailTemplatesTest::assertPreConditions in Auth0 Single Sign On 8.2

Test fixture for each method

File

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

Class

EmailTemplatesTest
Class EmailTemplatesTest

Namespace

Auth0\Tests\API\Management

Code

protected function assertPreConditions() {

  // Need to have an email provider setup for the tenant to perform this test.
  try {
    self::$api->emails
      ->getEmailProvider();
  } catch (\Exception $e) {
    $this
      ->markTestSkipped('Need to specify an email provider in the dashboard > Emails > Provider');
  }

  // If we don't have an email template and can't create, something sent wrong in self::setUpBeforeClass().
  if (!self::$mustCreate && empty(self::$gotEmail)) {
    $this
      ->markTestSkipped('Email template ' . self::EMAIL_TEMPLATE_NAME . ' not found with error ' . self::$setUpEmailError);
  }
}