You are here

public function CasServerConfigTest::testGetServerBaseUrl in CAS 8

Same name and namespace in other branches
  1. 2.x tests/src/Unit/CasServerConfigTest.php \Drupal\Tests\cas\Unit\CasServerConfigTest::testGetServerBaseUrl()

Test getServerBaseUrl.

@dataProvider getServerBaseUrlDataProvider

File

tests/src/Unit/CasServerConfigTest.php, line 102

Class

CasServerConfigTest
CasServerConfig unit tests.

Namespace

Drupal\Tests\cas\Unit

Code

public function testGetServerBaseUrl($serverConfig, $expectedBaseUrl) {
  $config_factory = $this
    ->getConfigFactoryStub([
    'cas.settings' => $serverConfig,
  ]);
  $casServerConfig = CasServerConfig::createFromModuleConfig($config_factory
    ->get('cas.settings'));
  $this
    ->assertEquals($expectedBaseUrl, $casServerConfig
    ->getServerBaseUrl());
}