public function StatusPageTest::testAuthProviderRequirementsNoToken in Salesforce Suite 5.0.x
Same name and namespace in other branches
- 8.4 tests/src/Functional/StatusPageTest.php \Drupal\Tests\salesforce\Functional\StatusPageTest::testAuthProviderRequirementsNoToken()
- 8.3 tests/src/Functional/StatusPageTest.php \Drupal\Tests\salesforce\Functional\StatusPageTest::testAuthProviderRequirementsNoToken()
Test requirements with providers and config, but no token.
File
- tests/
src/ Functional/ StatusPageTest.php, line 103
Class
Namespace
Drupal\Tests\salesforce\FunctionalCode
public function testAuthProviderRequirementsNoToken() {
$this->authMan
->setHasProviders(TRUE);
$this->authMan
->setHasConfig(TRUE);
$this->authMan
->setHasToken(FALSE);
$requirements = salesforce_get_auth_provider_requirements();
$this
->assertEquals(REQUIREMENT_ERROR, $requirements['severity']);
$this
->assertEquals($this
->t('Salesforce authentication failed. Please <a href="@href">check your auth provider settings</a> to connect to Salesforce.', [
'@href' => Url::fromRoute('entity.salesforce_auth.edit_form', [
'salesforce_auth' => $this->authMan
->getConfig()
->id(),
])
->toString(),
]), $requirements['description']);
}