You are here

public function StatusPageTest::testAuthProviderRequirementsNoConfig 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::testAuthProviderRequirementsNoConfig()
  2. 5.0.x tests/src/Functional/StatusPageTest.php \Drupal\Tests\salesforce\Functional\StatusPageTest::testAuthProviderRequirementsNoConfig()

Test requirements with providers, but no config.

File

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

Class

StatusPageTest
Test salesforce_requirements().

Namespace

Drupal\Tests\salesforce\Functional

Code

public function testAuthProviderRequirementsNoConfig() {
  $this->authMan
    ->setHasProviders(TRUE);
  $this->authMan
    ->setHasConfig(FALSE);
  $requirements = salesforce_get_auth_provider_requirements();
  $this
    ->assertEquals(REQUIREMENT_ERROR, $requirements['severity']);
  $this
    ->assertEquals($this
    ->t('Default auth provider has not been set. Please <a href="@href">choose an auth provider</a> to connect to Salesforce.', [
    '@href' => Url::fromRoute('salesforce.auth_config')
      ->toString(),
  ]), $requirements['description']);
}