function SystemAuthorizeTest::testFileTransferHooks

Same name in other branches
  1. 9 core/modules/system/tests/src/Functional/System/SystemAuthorizeTest.php \Drupal\Tests\system\Functional\System\SystemAuthorizeTest::testFileTransferHooks()
  2. 10 core/modules/system/tests/src/Functional/System/SystemAuthorizeTest.php \Drupal\Tests\system\Functional\System\SystemAuthorizeTest::testFileTransferHooks()
  3. 11.x core/modules/system/tests/src/Functional/System/SystemAuthorizeTest.php \Drupal\Tests\system\Functional\System\SystemAuthorizeTest::testFileTransferHooks()

Tests the FileTransfer hooks

File

core/modules/system/tests/src/Functional/System/SystemAuthorizeTest.php, line 53

Class

SystemAuthorizeTest
Tests the authorize.php script and related API.

Namespace

Drupal\Tests\system\Functional\System

Code

public function testFileTransferHooks() {
    $page_title = $this->randomMachineName(16);
    $this->drupalGetAuthorizePHP($page_title);
    $this->assertTitle("{$page_title} | Drupal");
    $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');
    // Test that \Drupal\Core\Render\BareHtmlPageRenderer adds assets as
    // expected to the first page of the authorize.php script.
    $this->assertRaw('core/misc/states.js');
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.