You are here

public function LingotekAccountTest::testDashboardIsNotAvailableBeforeConnecting in Lingotek Translation 3.2.x

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

Tests that the dashboard cannot be accessed without a valid user.

File

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

Class

LingotekAccountTest
Tests the Lingotek dashboard.

Namespace

Drupal\Tests\lingotek\Functional

Code

public function testDashboardIsNotAvailableBeforeConnecting() {
  $assert_session = $this
    ->assertSession();

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

  // Try to navigate to the Dashboard page, and assert we are redirected.
  $this
    ->drupalGet('admin/lingotek');
  $this
    ->assertUrl('admin/lingotek/setup/account');
  $assert_session
    ->linkExists('Connect Lingotek Account');
}