You are here

public function SettingsHelperTest::providerTestIsInvalidCredentialAccountId in Acquia Lift Connector 8.4

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

Data provider for testIsInvalidCredentialAccountId().

File

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

Class

SettingsHelperTest
SettingsHelper Test.

Namespace

Drupal\Tests\acquia_lift\Unit\Service\Helper

Code

public function providerTestIsInvalidCredentialAccountId() {
  $data = [];
  $data['invalid null'] = [
    NULL,
    TRUE,
  ];
  $data['invalid empty'] = [
    '',
    TRUE,
  ];
  $data['invalid start with number'] = [
    '1a',
    TRUE,
  ];
  $data['invalid has "~" sign'] = [
    'a~',
    TRUE,
  ];
  $data['valid has "_" sign'] = [
    'a_',
    FALSE,
  ];
  $data['valid start with alphabetic then alphanumeric'] = [
    'a123',
    FALSE,
  ];
  return $data;
}