public function LingotekAccountTest::testAccountCreationCancelled in Lingotek Translation 8
File
- src/
Tests/ LingotekAccountTest.php, line 79 - Contains \Drupal\lingotek\Tests\LingotekDashboardTest.
Class
- LingotekAccountTest
- Tests the Lingotek dashboard.
Namespace
Drupal\lingotek\TestsCode
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('Create New Lingotek Account');
// 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');
}