You are here

public function LingotekAccountTest::testAccountCreationCancelled in Lingotek Translation 8.2

Same name and namespace in other branches
  1. 3.0.x tests/src/Functional/LingotekAccountTest.php \Drupal\Tests\lingotek\Functional\LingotekAccountTest::testAccountCreationCancelled()
  2. 3.1.x tests/src/Functional/LingotekAccountTest.php \Drupal\Tests\lingotek\Functional\LingotekAccountTest::testAccountCreationCancelled()
  3. 3.2.x tests/src/Functional/LingotekAccountTest.php \Drupal\Tests\lingotek\Functional\LingotekAccountTest::testAccountCreationCancelled()
  4. 3.3.x tests/src/Functional/LingotekAccountTest.php \Drupal\Tests\lingotek\Functional\LingotekAccountTest::testAccountCreationCancelled()
  5. 3.4.x tests/src/Functional/LingotekAccountTest.php \Drupal\Tests\lingotek\Functional\LingotekAccountTest::testAccountCreationCancelled()
  6. 3.5.x tests/src/Functional/LingotekAccountTest.php \Drupal\Tests\lingotek\Functional\LingotekAccountTest::testAccountCreationCancelled()
  7. 3.6.x tests/src/Functional/LingotekAccountTest.php \Drupal\Tests\lingotek\Functional\LingotekAccountTest::testAccountCreationCancelled()
  8. 3.7.x tests/src/Functional/LingotekAccountTest.php \Drupal\Tests\lingotek\Functional\LingotekAccountTest::testAccountCreationCancelled()
  9. 3.8.x tests/src/Functional/LingotekAccountTest.php \Drupal\Tests\lingotek\Functional\LingotekAccountTest::testAccountCreationCancelled()

File

tests/src/Functional/LingotekAccountTest.php, line 79

Class

LingotekAccountTest
Tests the Lingotek dashboard.

Namespace

Drupal\Tests\lingotek\Functional

Code

public function testAccountCreationCancelled() {

  // Login as admin.
  $this
    ->drupalLogin($this->rootUser);

  // Try to navigate to the Dashboard page, and assert we are redirected.
  $this
    ->drupalGet('admin/lingotek/setup/account');

  // Fake the connection to an account in Lingotek.
  $this
    ->clickLink('Get started');

  // This will simulate a "cancel" click, so we need to ensure we are back
  // at the same page. We cannot test that we will be redirected, as it's done
  // via js. There is no way on the server to know the hash part of the url.
  $this
    ->assertUrl('/admin/lingotek/setup/account/handshake?success=true&prod=prod');
}