You are here

public function LingotekFake::getAccountInfo in Lingotek Translation 3.5.x

Same name and namespace in other branches
  1. 8 tests/modules/lingotek_test/src/LingotekFake.php \Drupal\lingotek_test\LingotekFake::getAccountInfo()
  2. 8.2 tests/modules/lingotek_test/src/LingotekFake.php \Drupal\lingotek_test\LingotekFake::getAccountInfo()
  3. 4.0.x tests/modules/lingotek_test/src/LingotekFake.php \Drupal\lingotek_test\LingotekFake::getAccountInfo()
  4. 3.0.x tests/modules/lingotek_test/src/LingotekFake.php \Drupal\lingotek_test\LingotekFake::getAccountInfo()
  5. 3.1.x tests/modules/lingotek_test/src/LingotekFake.php \Drupal\lingotek_test\LingotekFake::getAccountInfo()
  6. 3.2.x tests/modules/lingotek_test/src/LingotekFake.php \Drupal\lingotek_test\LingotekFake::getAccountInfo()
  7. 3.3.x tests/modules/lingotek_test/src/LingotekFake.php \Drupal\lingotek_test\LingotekFake::getAccountInfo()
  8. 3.4.x tests/modules/lingotek_test/src/LingotekFake.php \Drupal\lingotek_test\LingotekFake::getAccountInfo()
  9. 3.6.x tests/modules/lingotek_test/src/LingotekFake.php \Drupal\lingotek_test\LingotekFake::getAccountInfo()
  10. 3.7.x tests/modules/lingotek_test/src/LingotekFake.php \Drupal\lingotek_test\LingotekFake::getAccountInfo()
  11. 3.8.x tests/modules/lingotek_test/src/LingotekFake.php \Drupal\lingotek_test\LingotekFake::getAccountInfo()

Get the account information.

Return value

array|bool Array with account info. FALSE in case of error. The keys are user_id, username, login_id, email, and name.

Overrides LingotekInterface::getAccountInfo

File

tests/modules/lingotek_test/src/LingotekFake.php, line 49

Class

LingotekFake

Namespace

Drupal\lingotek_test

Code

public function getAccountInfo() {
  \Drupal::state()
    ->set('lingotek_fake.setup_completed', TRUE);

  // We need to store the resources. Let's force that.
  return [
    'id' => 'test',
    'type' => 'token',
    'client_id' => 'test_default_client_id',
    'user_id' => 'testUser',
    'login_id' => 'testUser@example.com',
    'expires_at' => -1,
  ];
}