You are here

function SystemAuthorizeCase::testFileTransferHooks in Drupal 7

Tests the FileTransfer hooks

File

modules/system/system.test, line 2894
Tests for system.module.

Class

SystemAuthorizeCase
Tests authorize.php and related hooks.

Code

function testFileTransferHooks() {
  $page_title = $this
    ->randomName(16);
  $this
    ->drupalGetAuthorizePHP($page_title);
  $this
    ->assertTitle(strtr('@title | Drupal', array(
    '@title' => $page_title,
  )), 'authorize.php page title is correct.');
  $this
    ->assertNoText('It appears you have reached this page in error.');
  $this
    ->assertText('To continue, provide your server connection details');

  // Make sure we see the new connection method added by system_test.
  $this
    ->assertRaw('System Test FileTransfer');

  // Make sure the settings form callback works.
  $this
    ->assertText('System Test Username');
}