You are here

public function CasServerConfigTest::getServerBaseUrlDataProvider in CAS 2.x

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

Data provider for testGetServerBaseUrl.

File

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

Class

CasServerConfigTest
CasServerConfig unit tests.

Namespace

Drupal\Tests\cas\Unit

Code

public function getServerBaseUrlDataProvider() {
  return [
    [
      [
        'server.protocol' => 'https',
        'server.hostname' => 'example.com',
        'server.port' => 443,
        'server.path' => '/cas',
      ],
      'https://example.com/cas/',
    ],
    [
      [
        'server.protocol' => 'http',
        'server.hostname' => 'foobar.net',
        'server.port' => 4433,
        'server.path' => '/cas-alt',
      ],
      'http://foobar.net:4433/cas-alt/',
    ],
  ];
}