public function LingotekTestCase::testProSetup in Lingotek Translation 7.7
Same name and namespace in other branches
- 7.4 tests/lingotek.setup.test \LingotekTestCase::testProSetup()
- 7.5 tests/lingotek.setup.test \LingotekTestCase::testProSetup()
- 7.6 tests/lingotek.setup.test \LingotekTestCase::testProSetup()
File
- tests/
lingotek.setup.test, line 154 - Lingotek Setup Test Case
Class
- LingotekTestCase
- @file Lingotek Setup Test Case
Code
public function testProSetup() {
debug('Beginning Pro Setup');
$this
->drupalGet(LINGOTEK_MENU_LANG_BASE_URL . '/setup');
$this
->assertResponse(403, 'Only allow access to users with permissions');
$this
->drupalLogin($this->admin_user);
$this
->drupalGet(LINGOTEK_MENU_LANG_BASE_URL . '/setup');
$this
->assertUrl(LINGOTEK_MENU_LANG_BASE_URL . '/new-account', array(), 'Redirect to first step of start page');
//1: Account Settings
$settings = array(
'first_name' => 'Automated Tester',
'last_name' => 'Code Tester',
'email' => 'test@example.com',
);
debug($settings);
$this
->drupalPost(NULL, $settings, 'Next');
$this
->assertText('Your new Lingotek account has been setup.', '<b>Step 1: Account Settings - Abililty to create account</b>');
//2: Enable Language Switcher
$this
->drupalPost(NULL, array(), 'Next');
$this
->assertText('The default language switcher is now enabled.', 'Step 2: Enable Language Switcher');
//3: Content Types
$this
->drupalPost(NULL, array(), 'Next');
$this
->assertText('Your content types have been updated.', 'Step 3: Enable Content Types');
//4: Comment Translation
$this
->drupalPost(NULL, array(), 'Next');
$this
->assertText('Your content types have been updated.', 'Step 4: Enable Comment Translation');
//5: Additional Translation
$this
->drupalPost(NULL, array(), 'Finish');
$this
->assertText('The configuration options have been saved.', 'Step 5: Enable Additional Translation');
}