You are here

public function SettingsHelperTest::providerTestPingUri in Acquia Lift Connector 8.3

Same name and namespace in other branches
  1. 8.4 tests/src/Unit/Service/Helper/SettingsHelperTest.php \Drupal\Tests\acquia_lift\Unit\Service\Helper\SettingsHelperTest::providerTestPingUri()

Data provider for testPingUri().

File

tests/src/Unit/Service/Helper/SettingsHelperTest.php, line 312

Class

SettingsHelperTest
SettingsHelper Test.

Namespace

Drupal\Tests\acquia_lift\Unit\Service\Helper

Code

public function providerTestPingUri() {
  $data = [];
  $data['invalid uri'] = [
    [
      'uri_1',
      '',
    ],
    [
      'statusCode' => '',
      'reasonPhrase' => '',
    ],
  ];
  $data['valid uri 1'] = [
    [
      'uri_1',
      'path_1',
    ],
    [
      'statusCode' => 123,
      'reasonPhrase' => 'a:1:{s:8:"base_uri";s:5:"uri_1";} path_1 a:1:{s:11:"http_errors";b:0;}',
    ],
  ];
  $data['valid uri 2'] = [
    [
      'uri_2',
      'path_2',
    ],
    [
      'statusCode' => 123,
      'reasonPhrase' => 'a:1:{s:8:"base_uri";s:5:"uri_2";} path_2 a:1:{s:11:"http_errors";b:0;}',
    ],
  ];
  return $data;
}