You are here

public function StatusPageTest::testAuthProviderRequirementsNoProviders in Salesforce Suite 8.4

Same name and namespace in other branches
  1. 8.3 tests/src/Functional/StatusPageTest.php \Drupal\Tests\salesforce\Functional\StatusPageTest::testAuthProviderRequirementsNoProviders()
  2. 5.0.x tests/src/Functional/StatusPageTest.php \Drupal\Tests\salesforce\Functional\StatusPageTest::testAuthProviderRequirementsNoProviders()

Test requirements when no providers are available.

File

tests/src/Functional/StatusPageTest.php, line 82

Class

StatusPageTest
Test salesforce_requirements().

Namespace

Drupal\Tests\salesforce\Functional

Code

public function testAuthProviderRequirementsNoProviders() {
  $this->authMan
    ->setHasProviders(FALSE);
  $requirements = salesforce_get_auth_provider_requirements();
  $this
    ->assertEquals(REQUIREMENT_ERROR, $requirements['severity']);
  $this
    ->assertEquals($this
    ->t('No auth providers have been created. Please <a href="@href">create an auth provider</a> to connect to Salesforce.', [
    '@href' => Url::fromRoute('entity.salesforce_auth.add_form')
      ->toString(),
  ]), $requirements['description']);
}